Limit service memory through cgroup controls.
Section: Transient Units and Resource Controls
Set memory cap on service
bash
bash
sudo systemctl set-property myjob.service MemoryMax=1GExplanation
Limit service memory through cgroup controls.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Transient Units and Resource Controls
Set CPU quota on service
Apply runtime resource-control properties to a unit.
Run process in transient scope
Run an interactive process in its own transient scope unit.
Run transient service
Launch a one-off command as a transient service unit.