Update systemd limits #30
Labels
No Label
Contributions welcome
Service packaging
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: SelfPrivacy/selfprivacy-nixos-config#30
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
If resources/limits.nix file is meant, ironically it's currently fully broken, since no directives from it are recognized by systemd in fact.
systemd show
output proves full ignorance (despitesystemd cat
confirms systemd service configuration is generated by Nix as expected). It was investigated as part of this task.There are 2 kinds of typos:
blockIOWeigth
must be written asBlockIOWeight
(the last 2 letters are swapped)As for the limit values themselves, the strategy is not clear, especially for the CPU quota. Maybe benchmarks or tests are needed to determine. And it's hard to say whether
BlockIOWeight = 10
is suitable for expected nginx loads or not (assuming the default weight is1000
).Also,
systemd-journald
consumes around 500 MiB of RAM, according to netdata (when uptime was 2 weeks). Perhaps, this should be due to:in
configuration.nix
.Maybe
RuntimeMaxUse
limit can be set to something lower, butjournald.conf
manpage doesn't claim its correlation with RAM consumption (but instead with/run/log/journal
filesystem space usage).As for RAM limits,
MemoryMax
is the absolute limit. It is recommended to useMemoryHigh
as the main control mechanism, because it allows to go above the limit, but the processses are heavily slowed down and memory is taken away aggressively according to systemd documentation.I fixed the typos (
e45224d67f
), but do not import this part of configuration until load tests get developed.