From 6389170b3927556ca3f2404b6525f2f57948419d Mon Sep 17 00:00:00 2001 From: talyz Date: Thu, 8 Apr 2021 19:03:44 +0200 Subject: [PATCH] nixos/gitlab: Set MALLOC_ARENA_MAX to "2" This should reduce memory fragmentation drastically and is recommended by both the Puma and the Sidekiq author. It's also the default value for Ruby deployments on Heroku. --- nixos/modules/services/misc/gitlab.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index 1240b3e69294..fbd5d0185b03 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -155,6 +155,7 @@ let GITLAB_REDIS_CONFIG_FILE = pkgs.writeText "redis.yml" (builtins.toJSON redisConfig); prometheus_multiproc_dir = "/run/gitlab"; RAILS_ENV = "production"; + MALLOC_ARENA_MAX = "2"; }; gitlab-rake = pkgs.stdenv.mkDerivation {