2

systemd launches a process in the /system.slice/process-name.service cgroup. I would like to launch the process in a different cgroup. I can do this using cgexec in the ExecStart option, but is there a better way?

3

Creat a group-name.slice, and set the resource control configuration in the slice unit, such as, CPUShares=, MemoryLimit=.

Then set Slice=group-name.slice in the process-name.service.

See man systemd.resource-control for details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.