Merge pull request #301064 from SuperSandro2000/redis-thp

nixos/redis: enable vmOverCommit by defaul; don't disable transparent hugepages

Changed files
+7 -6
nixos
doc
manual
release-notes
modules
services
databases
+2
nixos/doc/manual/release-notes/rl-2405.section.md
···
- `network-interfaces.target` system target was removed as it has been deprecated for a long time. Use `network.target` instead.
+
- `services.redis.vmOverCommit` now defaults to `true` and no longer enforces Transparent Hugepages (THP) to be disabled. Redis only works with THP configured to `madvise` which is the kernel's default.
+
- `azure-cli` now has extension support. For example, to install the `aks-preview` extension, use
```nix
+5 -6
nixos/modules/services/databases/redis.nix
···
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, ... }: {
···
'';
}) 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