Skip to content

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