sotoki icon indicating copy to clipboard operation
sotoki copied to clipboard

Redis warning about memory overcommit

Open benoit74 opened this issue 3 weeks ago • 3 comments

Should we care about redis warning regarding memory overcommit in "recent" Redis versions? (seen in Docker image obviously)

WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

benoit74 avatar Dec 04 '25 10:12 benoit74

Considering Redis should be configured to write nothing on the hard disk or been replicated... I wonder if Redis is wrongly configured or if we should just fix the configuration like recommended to avoid the message.

kelson42 avatar Dec 14 '25 07:12 kelson42

We should simply ignore it since we execute no SAVE and this is only related to saves. I've looked briefly and I don't think the warning can disappear. We could also set the vm_overcommit it but there might be unforeseen consequences and it's misleading.

rgaudin avatar Dec 15 '25 08:12 rgaudin

A first glance at the topic made me have the same opinion as @rgaudin ; but I felt a bit bad to have this warning forever, so I was unsure about writing it in this issue. Glad we come to the same conclusion ^^

I'm still waiting we can dive a bit more into this at some point, should we find a better solution

benoit74 avatar Dec 15 '25 11:12 benoit74