confine user(s) to a core with systemd + gcgroup

Michael Cronenworth mike at cchtml.com
Tue Jul 29 19:38:42 UTC 2014


On 07/29/2014 09:11 AM, lejeczek wrote:
>
> I thought I could easily (as easily as I could do that with libcgroup)
> permanently restric a user to a specific cpu core.
>
> I thought it would be CPUAffinity responsible for it either in
> systemd-user-sessions or(and) in systemd-logind
>
> but it does not work,
> is it possible to have user(s) sessions permanently restricted in this way? so
> his/her processes would be executed only on given core?
> if yes then how would you do this? please shed some light

You should find everything you need to know on this page.

https://www.kernel.org/doc/Documentation/cgroups/cpusets.txt

The basics of it are broken down like this:

1. Create a new cpuset
2. Set cpuset settings (single cpu, etc.)
3. Start task using the new cpuset


More information about the users mailing list