-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG] Remote Purge threadpool taking too much memory in case of too much deleted indices cleanup #12253
Comments
Thanks for creating this issue @gbbafna, OpenSearch/server/src/main/java/org/opensearch/index/store/RemoteSegmentStoreDirectory.java Lines 878 to 879 in 76ae14a
we are cleaning up one segment file at a time which is followed by cleaning up corresponding md file and then at the end we are cleaning up the directories. Since we already know that shard is being closed after deletion we can instead directly cleanup the directories using BlobContainer.delete() which would internally use batch deletion in most of the repository implementations to cleanup the individual objects.
Let me know if this makes sense. will raise a draft PR for this in sometime along with some snapshot deletion side optimizations. |
@harishbhakuni This sounds like a solid mitigation that will reduce the overhead when running into this issue. I think a draft PR would be a great next step if you can spin one up. |
Hi @ashking94 , this issue can be closed. |
Describe the bug
We use
Remote Purge
threadpool to delete segments data for deleted indices in shallow snapshots. When the number of such indices are huge, as well as the count of snapshots are huge , we see a pile up ofRemote Purge
threadpool . In the above heap dump , we can see 30 million instance ofRemote Purge
threads hogging up the memory of around 30 GB.Related component
Storage:Remote
To Reproduce
Expected behavior
Remote Purge threadpool should be bounded .
Shallow Snapshot Deletion also needs to be smarter to handle this deletion in a scalable way .
Additional Details
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: