diff options
| author | Jean-Baptiste Giraudeau <jean-baptiste.giraudeau@iohk.io> | 2022-01-07 15:06:07 +0100 |
|---|---|---|
| committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2022-01-07 09:53:58 -0800 |
| commit | d89eab1e42717622cfdd5f43f3b99e8680bdb637 (patch) | |
| tree | a7529fd10ae550dff93ab62bcb2e4f71cc4d184e | |
| parent | vscode-extensions.stkb.rewrap: 1.14.0 -> 1.15.4 (diff) | |
| download | nixpkgs-d89eab1e42717622cfdd5f43f3b99e8680bdb637.tar.gz | |
varnish: use jemalloc instead of glibc's malloc on linux.
this is the recommanded default, as glibc cause memory leaks:
"We ran into a problem with glibc's malloc on Linux where it seemed
like it failed to ever give memory back to the OS, causing the system
to swap. We have now switched to jemalloc which appears not to have
this problem." (from varnish-cache/doc/changes.rst)
(cherry picked from commit 24ce179bacd8e7a82557b02fbab037bc3a3b71b0)
| -rw-r--r-- | pkgs/servers/varnish/default.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/servers/varnish/default.nix b/pkgs/servers/varnish/default.nix index 5988c3a211e6..030af847874b 100644 --- a/pkgs/servers/varnish/default.nix +++ b/pkgs/servers/varnish/default.nix @@ -1,5 +1,5 @@ -{ lib, stdenv, fetchurl, fetchpatch, pcre, pcre2, libxslt, groff, ncurses, pkg-config, readline, libedit, coreutils -, python3, makeWrapper }: +{ lib, stdenv, fetchurl, fetchpatch, pcre, pcre2, jemalloc, libxslt, groff, ncurses, pkg-config, readline, libedit +, coreutils, python3, makeWrapper }: let common = { version, sha256, extraNativeBuildInputs ? [] }: @@ -19,7 +19,8 @@ let libxslt groff ncurses readline libedit makeWrapper python3 ] ++ lib.optional (lib.versionOlder version "7") pcre - ++ lib.optional (lib.versionAtLeast version "7") pcre2; + ++ lib.optional (lib.versionAtLeast version "7") pcre2 + ++ lib.optional stdenv.hostPlatform.isLinux jemalloc; buildFlags = [ "localstatedir=/var/spool" ]; |
