It is often said that more than half of the memory is allocated to the ES cache. How to check the size of the ES cache? (dry goods | read Elasticsearch heap memory)


Environment introduction

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

ES API view

  • See the help
GET _cat/nodes? help
  • Check the heap memory usage
GET _cat/nodes? v&h=ip,name,heap.*
IP name heap.current heap.percent heap.max node-1 17.2GB 57 30GB
  • Check the machine memory usage
GET _cat/nodes? v&h=ip,name,ram.*
IP name ram. Current ram. Percent ram. Max node-1 78.8GB 63 125.6GB

Linux Tools View

  • Htop view (11259 is the ES process ID)
htop -p 11259

  • Hcache view
./hcache -top 3

  • You can also specify a PID view
./hcache -pid 11259

This article from the
qbit snap