Akshay Maniyar
Akshay Maniyar

Reputation: 49

Redis: Free used_memory_rss without restarting redis

Over time the used_memory_rss keeps increasing. I understand the reason behind it getting filled (its how memory allocators work). However I need a solution to free it without restarting redis.

Is there any way to do the same?

Upvotes: 2

Views: 1138

Answers (2)

Pete Brumm
Pete Brumm

Reputation: 1696

in redis 4.0 there is a new command

MEMORY PURGE

that will defragment memory and release it to the OS.

also see

MEMORY HELP

Upvotes: 1

zczhuohuo
zczhuohuo

Reputation: 179

You may reference to this issue compact memory use online

Upvotes: 0

Related Questions