Skip to content
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

Reduce memory usage when print n most large keys #199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HonestManXin
Copy link

I have a rdb file about 3GB size, and i want to get the n most largest keys.
When i run the rdb tool in k8s pod with 8G memory, the rdb tools was killed due to cgroup memory limit.
The PrintAllKeys would hold all the records in the heap, but in fact we only need n most largest record in the heap.
At the same time, too many record in the heap also cost more cpu when push record in the heap.
After change to n-fixed size heap, the cost time reduced from 20min to 18min in my case.

Reduce memory usage when print n most large keys
@smilyFw
Copy link

smilyFw commented Nov 6, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants