Set memory limit on service
Apply cgroup limits without editing unit file
systemctl set-property myapp.service MemoryMax=512M CPUQuota=50%
- tool
- systemd26 commands
- tags
- systemdperformance
More systemd commands
-
systemctl status myapp.service | grep -E 'Memory:|CPU:|Tasks:'Current memory, CPU, and task counts from cgroup
-
systemctl list-units --type=socket --allAll socket-activated units and their state
-
systemctl mask snapd.servicePrevent a service from being started by anything
-
systemctl show myapp.service -p EnvironmentPrint environment variables injected into the service
-
systemd-analyze critical-chain <unit>Show the serialized dependency chain that actually delays boot; more honest than blame