Merge pull request #124566 from mweinelt/synapse-jemalloc
This commit is contained in:
commit
22a29f491a
@ -143,6 +143,13 @@ in {
|
|||||||
List of additional Matrix plugins to make available.
|
List of additional Matrix plugins to make available.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
withJemalloc = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to preload jemalloc to reduce memory fragmentation and overall usage.
|
||||||
|
'';
|
||||||
|
};
|
||||||
no_tls = mkOption {
|
no_tls = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
@ -720,7 +727,11 @@ in {
|
|||||||
--keys-directory ${cfg.dataDir} \
|
--keys-directory ${cfg.dataDir} \
|
||||||
--generate-keys
|
--generate-keys
|
||||||
'';
|
'';
|
||||||
environment.PYTHONPATH = makeSearchPathOutput "lib" cfg.package.python.sitePackages [ pluginsEnv ];
|
environment = {
|
||||||
|
PYTHONPATH = makeSearchPathOutput "lib" cfg.package.python.sitePackages [ pluginsEnv ];
|
||||||
|
} // optionalAttrs (cfg.withJemalloc) {
|
||||||
|
LD_PRELOAD = "${pkgs.jemalloc}/lib/libjemalloc.so";
|
||||||
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "notify";
|
Type = "notify";
|
||||||
User = "matrix-synapse";
|
User = "matrix-synapse";
|
||||||
|
Loading…
Reference in New Issue
Block a user