nixos/matrix-synapse: configure PYTHONMALLOC when using jemalloc

Per a synapse FAQ entry[1] this should be set in combination with\
jemalloc to make sure that jemalloc can accurately calculate memory
usage.

[1] https://github.com/element-hq/synapse/blob/develop/docs/usage/administration/admin_faq.md#help-synapse-is-slow-and-eats-all-my-ramcpu
This commit is contained in:
Martin Weinelt
2024-12-30 17:29:02 +01:00
parent 3be90b9f3a
commit e6f67cc259

View File

@@ -1462,6 +1462,7 @@ in
baseServiceConfig = {
environment = optionalAttrs (cfg.withJemalloc) {
LD_PRELOAD = "${pkgs.jemalloc}/lib/libjemalloc.so";
PYTHONMALLOC = "malloc";
};
serviceConfig = {
Type = "notify";