Elasticsearch & Lucene (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
How do you troubleshoot high CPU or long Garbage Collection pauses in Elasticsearch?
senior LevelMemory Management
In Simple Words:
- Run
GET /_nodes/hot_threadsto inspect which Java threads are consuming CPU (e.g. Lucene merge, query execution, regex). - Check thread pool rejections via
GET /_cat/thread_pool?v. - Inspect slow logs (
elasticsearch_index_slowlog.logandelasticsearch_search_slowlog.log). - Check garbage collection logs for Young/Old Gen GC pauses exceeding 1 second.