mirror of https://github.com/apache/lucene.git
LUCENE-4661: lower default maxThread/MergeCount in CMS
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1429616 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b9a3d9ca70
commit
fa59580879
|
@ -386,6 +386,10 @@ Optimizations
|
||||||
* LUCENE-4598: PayloadIterator no longer uses top-level IndexReader to iterate on the
|
* LUCENE-4598: PayloadIterator no longer uses top-level IndexReader to iterate on the
|
||||||
posting's payload. (Shai Erera, Michael McCandless)
|
posting's payload. (Shai Erera, Michael McCandless)
|
||||||
|
|
||||||
|
* LUCENE-4661: Drop default maxThreadCount to 1 and maxMergeCount to 2
|
||||||
|
in ConcurrentMergeScheduler, for faster merge performance on
|
||||||
|
spinning-magnet drives (Mike McCandless)
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
|
|
||||||
* LUCENE-4483: Refer to BytesRef.deepCopyOf in Term's constructor that takes BytesRef.
|
* LUCENE-4483: Refer to BytesRef.deepCopyOf in Term's constructor that takes BytesRef.
|
||||||
|
|
|
@ -55,14 +55,15 @@ public class ConcurrentMergeScheduler extends MergeScheduler {
|
||||||
// forcefully pause the larger ones, letting the smaller
|
// forcefully pause the larger ones, letting the smaller
|
||||||
// ones run, up until maxMergeCount merges at which point
|
// ones run, up until maxMergeCount merges at which point
|
||||||
// we forcefully pause incoming threads (that presumably
|
// we forcefully pause incoming threads (that presumably
|
||||||
// are the ones causing so much merging). We dynamically
|
// are the ones causing so much merging). We default to 1
|
||||||
// default this from 1 to 3, depending on how many cores
|
// here: tests on spinning-magnet drives showed slower
|
||||||
// you have:
|
// indexing perf if more than one merge thread runs at
|
||||||
private int maxThreadCount = Math.max(1, Math.min(3, Runtime.getRuntime().availableProcessors()/2));
|
// once (though on an SSD it was faster):
|
||||||
|
private int maxThreadCount = 1;
|
||||||
|
|
||||||
// Max number of merges we accept before forcefully
|
// Max number of merges we accept before forcefully
|
||||||
// throttling the incoming threads
|
// throttling the incoming threads
|
||||||
private int maxMergeCount = maxThreadCount+2;
|
private int maxMergeCount = 2;
|
||||||
|
|
||||||
/** {@link Directory} that holds the index. */
|
/** {@link Directory} that holds the index. */
|
||||||
protected Directory dir;
|
protected Directory dir;
|
||||||
|
|
Loading…
Reference in New Issue