Merge: nixos/matrix-synapse: configure PYTHONMALLOC when using jemalloc (#369444)

authored by Maximilian Bosch and committed by GitHub 1fdc9d0e c6be0af7

+4 -1
+2
nixos/doc/manual/release-notes/rl-2505.section.md
··· 304 305 - `services.avahi.ipv6` now defaults to true. 306 307 - `bind.cacheNetworks` now only controls access for recursive queries, where it previously controlled access for all queries. 308 309 - Caddy can now be built with plugins by using `caddy.withPlugins`, a `passthru` function that accepts an attribute set as a parameter. The `plugins` argument represents a list of Caddy plugins, with each Caddy plugin being a versioned module. The `hash` argument represents the `vendorHash` of the resulting Caddy source code with the plugins added.
··· 304 305 - `services.avahi.ipv6` now defaults to true. 306 307 + - For matrix homeserver Synapse we are now following the upstream recommendation to enable jemalloc as the memory allocator by default. 308 + 309 - `bind.cacheNetworks` now only controls access for recursive queries, where it previously controlled access for all queries. 310 311 - Caddy can now be built with plugins by using `caddy.withPlugins`, a `passthru` function that accepts an attribute set as a parameter. The `plugins` argument represents a list of Caddy plugins, with each Caddy plugin being a versioned module. The `hash` argument represents the `vendorHash` of the resulting Caddy source code with the plugins added.
+2 -1
nixos/modules/services/matrix/synapse.nix
··· 705 706 withJemalloc = mkOption { 707 type = types.bool; 708 - default = false; 709 description = '' 710 Whether to preload jemalloc to reduce memory fragmentation and overall usage. 711 ''; ··· 1462 baseServiceConfig = { 1463 environment = optionalAttrs (cfg.withJemalloc) { 1464 LD_PRELOAD = "${pkgs.jemalloc}/lib/libjemalloc.so"; 1465 }; 1466 serviceConfig = { 1467 Type = "notify";
··· 705 706 withJemalloc = mkOption { 707 type = types.bool; 708 + default = true; 709 description = '' 710 Whether to preload jemalloc to reduce memory fragmentation and overall usage. 711 ''; ··· 1462 baseServiceConfig = { 1463 environment = optionalAttrs (cfg.withJemalloc) { 1464 LD_PRELOAD = "${pkgs.jemalloc}/lib/libjemalloc.so"; 1465 + PYTHONMALLOC = "malloc"; 1466 }; 1467 serviceConfig = { 1468 Type = "notify";