From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 212841FA04; Mon, 18 May 2020 03:04:41 +0000 (UTC) Date: Mon, 18 May 2020 03:04:41 +0000 From: Eric Wong To: meta@public-inbox.org Subject: Re: [PATCH] index: add --batch-size=SIZE option Message-ID: <20200518030441.GB32411@dcvr> References: <20200517193721.29185-1-e@yhbt.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200517193721.29185-1-e@yhbt.net> List-Id: Eric Wong wrote: > On powerful systems, having this option is preferable to > XAPIAN_FLUSH_THRESHOLD due to lock granularity and contention > with other processes (-learn, -mda, -watch). > > Setting XAPIAN_FLUSH_THRESHOLD can cause -learn, -mda, and > -watch to get stuck until an epoch is completely processed. Fwiw, I've debated with myself on-and-off for a number of years about adding this knob. I don't like tuning knobs in general because it's more stuff to document and support, and more stuff for new users to learn. However, it's tough to tell how much memory a user is willing to spend or how long they're willing to wait for -mda/-watch deliveries while --reindex is happening. So the default is to remain conservative and lean towards suboptimal throughput rather than trigger a swap storm or OOM.