nixos/redis: enable vmOverCommit by default as recommended by redis itself

> 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.
This commit is contained in:
Sandro Jäckel 2024-04-02 23:33:06 +02:00
parent 2cf2f3a306
commit 5071c02bb0
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -57,9 +57,9 @@ in {
package = mkPackageOption pkgs "redis" { };
vmOverCommit = mkEnableOption ''
setting of vm.overcommit_memory to 1
set `vm.overcommit_memory` sysctl to 1
(Suggested for Background Saving: <https://redis.io/docs/get-started/faq/>)
'';
'' // { default = true; };
servers = mkOption {
type = with types; attrsOf (submodule ({ config, name, ... }: {