I'm running Redis 4.0.1 on Linux, compiled with default settings. I've enabled aggressive defragmentation and it's working too, but memory can't be reclaimed.
This is a redis cluster cluster, memory fragmentation 1.54, using memory purge still cannot reclaim memory
Comment From: swords1999
procs-pid-maps.txt redis_info.txt memory-malloc-stats.txt
Comment From: swords1999
22283:S 03 Aug 15:13:08.957 . allocated=11659290840, active=17224245248, resident=18013290496, frag=48% (54% rss), frag_bytes=5564954408 (6353999656% rss)
Comment From: zuiderkwast
The mapping from slot to keys in older redis versions was using a radix tree (rax) which wasn't defragged which prevented these memory blocks from being reclaimed. This was changed in redis 6.0 or maybe 6.2.
Maybe you should upgrade redis?
Comment From: swords1999
you are right