redis / docker-library-redis

Docker Official Image packaging for Redis
http://redis.io
BSD 3-Clause "New" or "Revised" License
1.12k stars 563 forks source link

Warning about memory overcommit at start up #346

Closed sim6 closed 1 year ago

sim6 commented 1 year ago
# WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can 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.
yosifkit commented 1 year ago

vm.overcommit_memory is a host level setting (not namespaced) and so cannot be set/changed for a single container. So it must be set on the host and will affect all containers that run there.

See also

sim6 commented 1 year ago

Thanks!