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.
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.