Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F37043FC9 for ; Mon, 2 May 2011 13:42:55 +0000 (UTC) Received: (qmail 13109 invoked by uid 500); 2 May 2011 13:42:54 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 13047 invoked by uid 500); 2 May 2011 13:42:54 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 13040 invoked by uid 99); 2 May 2011 13:42:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 May 2011 13:42:54 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of earwin@gmail.com designates 209.85.216.48 as permitted sender) Received: from [209.85.216.48] (HELO mail-qw0-f48.google.com) (209.85.216.48) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 May 2011 13:42:46 +0000 Received: by qwj9 with SMTP id 9so3735702qwj.35 for ; Mon, 02 May 2011 06:42:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=S9Negn4Sr1WsFjnMx+tv7x+r2dRgnBeV4YLzSVVJMT8=; b=a325Aswwsq1lfhYGSQ3xbXVyPNxFHPVW1VuNqks1AT5tjUAYxJ22iOWtDOl14a+SR2 FGxxh1xQ4c8cCYsLFEo1PUPM6nkdM0V761yrqfl1jeV4LfAMbv8juowJ/q77waLBeMMU JXsGSViWKk8en4161rw0+kGwxhpRfijKu13Bg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=czE49kojjFyFq6q9rnLsH2gsaOA5XvfCbms0ACEvnO/7G1/CSRKNJl04WyAU0MkjvQ JtegGJAjQ2ZhyTQvf/65K/DqADqS2rB3A0ehkU+W1WmxhTP+MWErvCxOU+NHHlYaxODF OR2+bO/vpJQHd25g771cpmzwRJlkq3Ul6Ms1E= MIME-Version: 1.0 Received: by 10.224.18.70 with SMTP id v6mr6528792qaa.316.1304343746004; Mon, 02 May 2011 06:42:26 -0700 (PDT) Received: by 10.229.18.74 with HTTP; Mon, 2 May 2011 06:42:25 -0700 (PDT) In-Reply-To: References: Date: Mon, 2 May 2011 17:42:25 +0400 Message-ID: Subject: Re: MergePolicy Thresholds From: Earwin Burrfoot To: dev@lucene.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Have you checked BalancedSegmentMergePolicy? It has some more knobs :) On Mon, May 2, 2011 at 17:03, Shai Erera wrote: > Hi > > Today, LogMP allows you to set different thresholds for segments sizes, > thereby allowing you to control the largest segment that will be > considered for merge + the largest segment your index will hold (=3D~ > threshold * mergeFactor). > > So, if you want to end up w/ say 20GB segments, you can set > maxMergeMB(ForOptimize) to 2GB and mergeFactor=3D10. > > However, this often does not achieve your desired goal -- if the index > contains 5 and 7 GB segments, they will never be merged b/c they are > bigger than the threshold. I am willing to spend the CPU and IO resources > to end up w/ 20 GB segments, whether I'm merging 10 segments together or > only 2. After I reach a 20GB segment, it can rest peacefully, at least > until I increase the threshold. > > So I wonder, first, if this threshold (i.e., largest segment size you > would like to end up with) is more natural to set than thee current > thresholds, > from the application level? I.e., wouldn't it be a simpler threshold to s= et > instead of doing weird calculus that depend on maxMergeMB(ForOptimize) > and mergeFactor? > > Second, should this be an addition to LogMP, or a different > type of MP. One that adheres to only those two factors (perhaps the > segSize threshold should be allowed to set differently for optimize and > regular merges). It can pick segments for merge such that it maximizes > the result segment size (i.e., don't necessarily merge in sequential > order), but not more than mergeFactor. > > I guess, if we think that maxResultSegmentSizeMB is more intuitive than > the current thresholds, application-wise, then this change should go > into LogMP. Otherwise, it feels like a different MP is needed, because > LogMP is already complicated and another threshold would confuse things. > > What do you think of this? Am I trying to optimize too much? :) > > Shai > > --=20 Kirill Zakharenko/=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB =D0=97=D0=B0=D1=85= =D0=B0=D1=80=D0=B5=D0=BD=D0=BA=D0=BE E-Mail/Jabber: earwin@gmail.com Phone: +7 (495) 683-567-4 ICQ: 104465785 --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org