第1.9章 elasticsearch Nodes hot_threads

本文深入解析Elasticsearch的_hot_threads API返回信息,展示如何通过监控get线程的CPU使用情况来定位性能瓶颈,特别关注了三个繁忙的get线程,提供了具体的线程活动快照,帮助理解集群节点上热的线程分布,为性能优化提供线索。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Nodes hot_threads,根据官方描述_nodes/hot_threads获取集群中每个节点当前热线程,我执行后的返回的结果信息很长,那么该怎么解读呢?
很容易推理出,hot_threads在哪里,那么哪里就是性能优化的地方。
185上面并没有热的线程与下图top监控的指标是吻合的。

::: {bwhs185}{0l0BABnLTfKt4NBEI8uuUA}{V0Ycx2FaS_OUM9Z9jbCLMg}{10.101.3.185}{10.101.3.185:9300}{ml.max_open_jobs=10, ml.enabled=true}
   Hot threads at 2019-04-19T01:52:34.843Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true:

1
从下面的快照,可以看到3个get线程占用了资源,但是这个指标能解决什么问题,暂无头绪。

::: {bwhs184}{0CnTTaSaRt-X5m5hj-Oqdw}{OjqrxRmCQfKIjwOHA-Mheg}{10.101.3.184}{10.101.3.184:9300}{ml.max_open_jobs=10, ml.enabled=true}
   Hot threads at 2019-04-19T02:01:14.806Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true:
   
   16.4% (81.7ms out of 500ms) cpu usage by thread 'elasticsearch[bwhs184][get][T#4]'
     8/10 snapshots sharing following 2 elements
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       java.lang.Thread.run(Thread.java:748)
   
   16.0% (80ms out of 500ms) cpu usage by thread 'elasticsearch[bwhs184][get][T#3]'
     5/10 snapshots sharing following 2 elements
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       java.lang.Thread.run(Thread.java:748)
   
   10.0% (50ms out of 500ms) cpu usage by thread 'elasticsearch[bwhs184][get][T#1]'
     4/10 snapshots sharing following 2 elements
       java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       java.lang.Thread.run(Thread.java:748)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

warrah

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值