diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2024-04-02 23:33:06 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2024-04-28 21:17:03 +0200 |
commit | 5071c02bb071ca7fdd9080248902f43f1817a546 (patch) | |
tree | 45c48f3678655c25e1b27c211012cd2b9e3badb1 | |
parent | 2cf2f3a306f5ea1f0e184b4317c4d50679ec49b3 (diff) |
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.
-rw-r--r-- | nixos/modules/services/databases/redis.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix index 1da2fa9f11604..76a1c9b7fb665 100644 --- a/nixos/modules/services/databases/redis.nix +++ b/nixos/modules/services/databases/redis.nix @@ -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, ... }: { |