Unverified Commit 5071c02b authored by Sandro Jäckel's avatar Sandro Jäckel
Browse files

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.
parent 2cf2f3a3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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, ... }: {