1

前言

  • 本文对 Elasticsearch 7.17 适用

节点角度

GET _cat/nodes?v&s=name&h=name,segmentsCount,segmentsMemory
GET _nodes/thread_pool
  • 配置节点上段合并的线程数(elasticsearch.yml)(官方文档
thread_pool:
    force_merge:
        size: 2
# 或者用下面的格式
thread_pool.force_merge.size: 2

索引角度

GET my_index/_segments
GET _cat/segments/my_index?v&h=index,shard,prirep,segment,docs.count,docs.deleted,size
  • 查看 segment 的统计数据
GET _cat/indices/index_*?s=segmentsCount:desc&v&h=index,segmentsCount,segmentsMemory,memoryTotal,mergesCurrent,mergesCurrentDocs,storeSize,p,r
  • 查看段合并任务
GET _tasks?detailed=true&actions=*forcemerge&human
  • 查看节点段合并的线程数
GET _cat/thread_pool/force_merge?v&s=node_name
  • 调整某索引单个分片上段合并的线程数:官方文档
PUT my-index/_settings
{
  "index.merge.scheduler.max_thread_count": 4
}
POST my_index/_forcemerge?max_num_segments=1
POST my_index/_cache/clear
本文出自 qbit snap

qbit
268 声望279 粉丝