查看 Elasticsearch 的 Cache 占用(qbit)

引子

常说要留一半以上的内存给 ES 的 cache,那么怎样查看 ES 占用的 cache 的大小?(干货 | 吃透Elasticsearch 堆内存

实践

环境介绍

CPU: Intel Xeon E5-2620 v2 (24) @ 2.600GHz
Memory: 128GB
OS: CentOS Linux release 7.9.2009
ES: 7.10.0

ES api 查看

  • 查看帮助
GET _cat/nodes?help
  • 查看堆内存使用情况
GET _cat/nodes?v&h=ip,name,heap.*
ip name heap.current heap.percent heap.max
192.168.1.219 node-1 17.2gb 57 30gb
  • 查看机器内存使用情况
GET _cat/nodes?v&h=ip,name,ram.*
ip name ram.current ram.percent ram.max
192.168.31.219 node-1 78.8gb 63 125.6gb

Linux 工具查看

  • htop 查看(11259 为 ES 进程 ID)
htop -p 11259

./hcache -top 3

  • 也可以指定 PID 查看
./hcache -pid 11259
本文出自 qbit snap
    作者:qbit原文地址:https://segmentfault.com/a/1190000038221957

    %s 个评论

    要回复文章请先登录注册