Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 22508 invoked from network); 2 Dec 2008 19:06:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Dec 2008 19:06:19 -0000 Received: (qmail 6787 invoked by uid 500); 2 Dec 2008 19:06:24 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 6753 invoked by uid 500); 2 Dec 2008 19:06:24 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 6742 invoked by uid 99); 2 Dec 2008 19:06:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2008 11:06:24 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.46.28] (HELO yw-out-2324.google.com) (74.125.46.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2008 19:04:55 +0000 Received: by yw-out-2324.google.com with SMTP id 3so1224805ywj.5 for ; Tue, 02 Dec 2008 11:05:40 -0800 (PST) Received: by 10.90.96.15 with SMTP id t15mr1305600agb.37.1228244740101; Tue, 02 Dec 2008 11:05:40 -0800 (PST) Received: from ?10.17.4.4? (pool-173-48-164-75.bstnma.fios.verizon.net [173.48.164.75]) by mx.google.com with ESMTPS id 34sm6519242agc.6.2008.12.02.11.05.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 02 Dec 2008 11:05:39 -0800 (PST) Message-Id: <1FA15019-4090-4736-8CAF-89275F5735E5@mikemccandless.com> From: Michael McCandless To: java-user@lucene.apache.org In-Reply-To: <5e76f3840812021017m4c33ad7fj919a3edf466b90ba@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: Merging indexes & multicore/multithreading Date: Tue, 2 Dec 2008 14:05:34 -0500 References: <5e76f3840812021017m4c33ad7fj919a3edf466b90ba@mail.gmail.com> X-Mailer: Apple Mail (2.929.2) X-Virus-Checked: Checked by ClamAV on apache.org With ConcurrentMergeScheduler, adding all indexes at once to a single IndexWriter will use multiple threads to do the merging, assuming you have enough total segments that need merging (> 2 X mergeFactor will use 2 threads; > 3 X mergeFactor will use 3, etc.; CMS defaults to max 3 merge threads at once). I think merging is mainly IO bound, so you may only see a win using multiple threads if your IO system has concurrency to exploit. Try both and post back the results :) Mike Glen Newton wrote: > Let's say I have 8 indexes on a 4 core system and I want to merge them > (inside a single vm instance). > Is it better to do a single merge of all 8, or to in parallel threads > merge in pairs, until there is only a single index left? I guess the > question involves how multi-threaded merging is and if it will take > advantage of all cores. > > thanks, > > -glen > > -- > > - > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org