Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ec20b31cff78
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f6dac8083874
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Oct 21, 2019

  1. Copy the full SHA
    26b4119 View commit details
  2. Merge pull request #71585 from maralorn/release-19.09

    nixos/redis: [19.09] Disable hugepages for redis via sysctl and not via a sys…
    flokli authored Oct 21, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    delroth Pierre Bourdon
    Copy the full SHA
    f6dac80 View commit details
Showing with 3 additions and 11 deletions.
  1. +3 −11 nixos/modules/services/databases/redis.nix
14 changes: 3 additions & 11 deletions nixos/modules/services/databases/redis.nix
Original file line number Diff line number Diff line change
@@ -186,9 +186,9 @@ in

config = mkIf config.services.redis.enable {

boot.kernel.sysctl = mkIf cfg.vmOverCommit {
"vm.overcommit_memory" = "1";
};
boot.kernel.sysctl = {
"vm.nr_hugepages" = "0";
} // mkIf cfg.vmOverCommit { "vm.overcommit_memory" = "1"; };

networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [ cfg.port ];
@@ -198,14 +198,6 @@ in

environment.systemPackages = [ cfg.package ];

systemd.services.disable-transparent-huge-pages = {
description = "Disable Transparent Huge Pages (required by Redis)";
before = [ "redis.service" ];
wantedBy = [ "redis.service" ];
script = "echo never > /sys/kernel/mm/transparent_hugepage/enabled";
serviceConfig.Type = "oneshot";
};

systemd.services.redis =
{ description = "Redis Server";