| 123456789101112131415161718192021222324252627282930 | [[index-modules-merge]]== MergeA shard in elasticsearch is a Lucene index, and a Lucene index is broken downinto segments. Segments are internal storage elements in the index where theindex data is stored, and are immutable. Smaller segments are periodicallymerged into larger segments to keep the index size at bay and to expungedeletes.The merge process uses auto-throttling to balance the use of hardwareresources between merging and other activities like search.[float][[merge-scheduling]]=== Merge schedulingThe merge scheduler (ConcurrentMergeScheduler) controls the execution of mergeoperations when they are needed.  Merges run in separate threads, and when themaximum number of threads is reached, further merges will wait until a mergethread becomes available.The merge scheduler supports the following _dynamic_ setting:`index.merge.scheduler.max_thread_count`::    The maximum number of threads that may be merging at once. Defaults to    `Math.max(1, Math.min(4, Runtime.getRuntime().availableProcessors() / 2))`    which works well for a good solid-state-disk (SSD).  If your index is on    spinning platter drives instead, decrease this to 1.
 |