Index Merge: Change default `index.merge.scheduler.max_thread_count` from ` to be adaptive based on processor count, closes #469.

This commit is contained in:
kimchy 2010-11-02 14:00:58 +02:00
parent 2cdaf6357b
commit 3fe2851dae
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ public class ConcurrentMergeSchedulerProvider extends AbstractIndexShardComponen
super(shardId, indexSettings);
// TODO LUCENE MONITOR this will change in Lucene 4.0
this.maxThreadCount = componentSettings.getAsInt("max_thread_count", 1);
this.maxThreadCount = componentSettings.getAsInt("max_thread_count", Math.max(1, Math.min(3, Runtime.getRuntime().availableProcessors() / 2)));
logger.debug("using [concurrent] merge scheduler with max_thread_count[{}]", maxThreadCount);
}