Skip to content

Analysis of ES 7.16 Memory Consumption: Multiple Factors Leading to Memory Surge and the Mystery of 9GB Memory Stuck in GC and Optimization Exploration #127300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zhang18668 opened this issue Apr 24, 2025 · 1 comment
Labels
needs:triage Requires assignment of a team area label

Comments

@zhang18668
Copy link

zhang18668 commented Apr 24, 2025

The recent memory consumption of JVM is as follows:

Image

The green area has optimized space for resident memory
The heap memory of ES is basically divided into segment memory Filter Cache、Field Data Cache、Bulk Queue、Indexing Buffer、Cluster State Buffer、 The result set fetch consumed by various aggregation queries

一、Segment Memory
This memory is not used by GC and currently only occupies 500M

2、Filter Cache

This memory is also not used by GC, currently occupying less than 500M

3、Field Data Cache
This memory is also not used by GC and currently only occupies less than 700M. We manually cleaned it up

4、Bulk Queue Indexing Buffer
Both of these are system default values, 10%, and the usage will not be very large

Cluster State Buffer
My ES version is 7.16, and now it's this state buffer. I can't confirm how much I've used. Currently, the disk usage of my cold node is only 45%. When I increased the utilization of the cold disk, I found that the memory skyrocketed severely,

Image

7、 Fetch of ultra large search aggregation result set
I use scroll queries for everything, and I have also tried manually deleting all scorels without seeing a decrease in permanent memory

After overall investigation, it is still due to the fact that the larger the amount of data, the higher the memory. Also, where did the 9 GB of memory that has been stuck in GC go? How to optimize the memory usage of this part?

@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Apr 24, 2025
@DaveCTurner
Copy link
Contributor

Thank you very much for your interest in Elasticsearch. Unfortunately the issue you have reported relates to Elasticsearch version 7.16 which is very old and has passed end-of-life. We will not investigate issues related to unsupported versions here on Github, so I am closing this to indicate that no action is needed from the Elasticsearch development team. It's possible that you will find a volunteer to help you with this issue on the community forums, but our strong recommendation would be to upgrade to a supported version of Elasticsearch as a matter of some urgency. If you can reproduce your issue on a supported version then please open a fresh bug report.

Quoting the bug report form:

Please also check your OS is supported, and that the version of Elasticsearch has not passed end-of-life. If you are using an unsupported OS or an unsupported version then the issue is likely to be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:triage Requires assignment of a team area label
Projects
None yet
Development

No branches or pull requests

3 participants