Package org.elasticsearch.index
Class MergeSchedulerConfig
java.lang.Object
org.elasticsearch.index.MergeSchedulerConfig
public final class MergeSchedulerConfig
extends java.lang.Object
The merge scheduler (
ConcurrentMergeScheduler
) controls the execution of
merge operations once they are needed (according to the merge policy). Merges
run in separate threads, and when the maximum number of threads is reached,
further merges will wait until a merge thread becomes available.
The merge scheduler supports the following dynamic settings:
-
index.merge.scheduler.max_thread_count
: The maximum number of threads that may be merging at once. Defaults toMath.max(1, Math.min(4,
which works well for a good solid-state-disk (SSD). If your index is on spinning platter drives instead, decrease this to 1.EsExecutors.allocatedProcessors(Settings)
/ 2)) index.merge.scheduler.auto_throttle
: If this is true (the default), then the merge scheduler will rate-limit IO (writes) for merges to an adaptive value depending on how many merges are requested over time. An application with a low indexing rate that unluckily suddenly requires a large merge will see that merge aggressively throttled, while an application doing heavy indexing will see the throttle move higher to allow merges to keep up with ongoing indexing.
-
Field Summary
Fields Modifier and Type Field Description static Setting<java.lang.Boolean>
AUTO_THROTTLE_SETTING
static Setting<java.lang.Integer>
MAX_MERGE_COUNT_SETTING
static Setting<java.lang.Integer>
MAX_THREAD_COUNT_SETTING
-
Method Summary
Modifier and Type Method Description int
getMaxMergeCount()
ReturnsmaxMergeCount
.int
getMaxThreadCount()
ReturnsmaxThreadCount
.boolean
isAutoThrottle()
Returnstrue
iff auto throttle is enabled.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
MAX_THREAD_COUNT_SETTING
-
MAX_MERGE_COUNT_SETTING
-
AUTO_THROTTLE_SETTING
-
-
Method Details
-
isAutoThrottle
public boolean isAutoThrottle()Returnstrue
iff auto throttle is enabled.- See Also:
ConcurrentMergeScheduler.enableAutoIOThrottle()
-
getMaxThreadCount
public int getMaxThreadCount()ReturnsmaxThreadCount
. -
getMaxMergeCount
public int getMaxMergeCount()ReturnsmaxMergeCount
.
-