selfprivacy-nixos-config/resources/limits.nix

48 lines
1 KiB
Nix
Raw Permalink Normal View History

2021-11-15 10:02:05 +00:00
{
systemd.services = {
dovecot2 = {
serviceConfig = {
CpuAccounting = true;
CpuQuota = "20%";
MemoryAccounting = true;
MemoryMax = "256M";
StartLimitIntervalSec = 500;
StartLimitBurst = 5;
BlockIOWeight = 25;
2021-11-15 10:02:05 +00:00
};
};
postfix = {
serviceConfig = {
CpuAccounting = true;
CpuQuota = "20%";
MemoryAccounting = true;
MemoryMax = "256M";
StartLimitIntervalSec = 500;
StartLimitBurst = 5;
BlockIOWeight = 25;
2021-11-15 10:02:05 +00:00
};
};
ocserv = {
serviceConfig = {
CpuAccounting = true;
CpuQuota = "70%";
MemoryAccounting = true;
MemoryMax = "512M";
StartLimitIntervalSec = 500;
StartLimitBurst = 5;
2021-11-15 10:02:05 +00:00
};
};
nginx = {
serviceConfig = {
CpuAccounting = true;
CpuQuota = "70%";
MemoryAccounting = true;
MemoryMax = "768M";
StartLimitIntervalSec = 500;
StartLimitBurst = 5;
BlockIOWeight = 10;
2021-11-15 10:02:05 +00:00
};
};
};
}