Redis – High RSS Memory After Lowering maxmemory

redis

I would like Redis to return some memory. I lowered the maxmemory by 10GB but noticed Redis is still "holding onto it" in RSS based on "used_memory_rss". Based on http://redis.io/topics/memory-optimization, it looks like Redis won't return the memory to the OS. How do I force this? Is there any way to do this without restarting Redis?

Best Answer

I had the same problem and this answer was helpful.

even though Redis isn’t using the memory anymore, the allocator just hasn’t released the memory back to the OS yet. Reds v4 has a MEMORY PURGE command to tell the allocator to release the memory it isn’t using, but unfortunately that isn’t available to you on v3.2.