summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services/databases
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2024-04-02 23:53:20 +0200
committerSandro Jäckel <sandro.jaeckel@gmail.com>2024-04-28 21:17:03 +0200
commit5f349abc7bb21ee5528acd27fc0667c9b3f7f813 (patch)
tree47821d5a563c4ca01296741c51db508fcee1653a /nixos/modules/services/databases
parent5071c02bb071ca7fdd9080248902f43f1817a546 (diff)
nixos/redis: don't disable transparent hugepages
Since https://github.com/redis/redis/pull/4001 included in 6.2.0 transparent hugepages works when being set to madvise which is the NixOS and upstream recommended default.
Diffstat (limited to 'nixos/modules/services/databases')
-rw-r--r--nixos/modules/services/databases/redis.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix
index 76a1c9b7fb66..ad88a4f589a2 100644
--- a/nixos/modules/services/databases/redis.nix
+++ b/nixos/modules/services/databases/redis.nix
@@ -312,10 +312,9 @@ in {
'';
}) enabledServers);
- boot.kernel.sysctl = mkMerge [
- { "vm.nr_hugepages" = "0"; }
- ( mkIf cfg.vmOverCommit { "vm.overcommit_memory" = "1"; } )
- ];
+ boot.kernel.sysctl = mkIf cfg.vmOverCommit {
+ "vm.overcommit_memory" = "1";
+ };
networking.firewall.allowedTCPPorts = concatMap (conf:
optional conf.openFirewall conf.port