merge.asciidoc 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. [[index-modules-merge]]
  2. == Merge
  3. A shard in Elasticsearch is a Lucene index, and a Lucene index is broken down
  4. into segments. Segments are internal storage elements in the index where the
  5. index data is stored, and are immutable. Smaller segments are periodically
  6. merged into larger segments to keep the index size at bay and to expunge
  7. deletes.
  8. The merge process uses auto-throttling to balance the use of hardware
  9. resources between merging and other activities like search.
  10. [float]
  11. [[merge-scheduling]]
  12. === Merge scheduling
  13. The merge scheduler (ConcurrentMergeScheduler) controls the execution of merge
  14. operations when they are needed. Merges run in separate threads, and when the
  15. maximum number of threads is reached, further merges will wait until a merge
  16. thread becomes available.
  17. The merge scheduler supports the following _dynamic_ setting:
  18. `index.merge.scheduler.max_thread_count`::
  19. The maximum number of threads on a single shard that may be merging at once.
  20. Defaults to
  21. `Math.max(1, Math.min(4, Runtime.getRuntime().availableProcessors() / 2))`
  22. which works well for a good solid-state-disk (SSD). If your index is on
  23. spinning platter drives instead, decrease this to 1.