Elasticsearch segment merging (qbit)

Time:2021-6-11

preface

  • In this paperElasticsearch7.10 application

Node angle

Index angle

  • View indexindex segmentSituation(Official documents

    GET my_index/_segments
  • View indexcat segmentSituation(Official documents

    GET _cat/segments/my_index?v&h=index,shard,prirep,segment
  • seesegmentStatistics of

    GET _cat/indices/index_*?s=segmentsCount:desc&v&h=index,segmentsCount,segmentsMemory,memoryTotal,mergesCurrent,mergesCurrentDocs,storeSize,p,r
  • View segment merge tasks

    GET _tasks?detailed=true&actions=*forcemerge&human
  • View the number of threads for node segment merging

    GET _cat/thread_pool/force_merge?v&s=node_name
  • Adjust the number of threads for index segment merging:Official documents

    PUT my-index/_settings
    {
    "index.merge.scheduler.max_thread_count": 4
    }
  • Segment merging(Official documents

    POST my_index/_forcemerge?max_num_segments=1
  • Situation index cache(Official documents

    POST my_index/_cache/clear

This article comes fromqbit snap