dockeraffinitynumataskset

It is possible to pin dockerd and containerd to core 0 using taskset or systemd CPUAffinity=0


I'm trying to see if I can pin dockerd and containerd to core 0 on a Linux server, leaving all the other cores for the containers (using cpuset). So I used this on my systemd unit:

[Service]
CPUAffinity=0

I noticed than the children processes also got pinned to core 0 (tasket manual explains this is the expected behavior):

grep -i cpu /proc/$PID/status


My questions are:

  1. It is possible to pin just the parent processes but the children can run where they want by using cpuset
  2. Is anybody out there doing this? My concern is that I want to let some sensitive process work uninterrupted, by tying interrupts and other processes to core 0

Thanks,


Solution

  • taskset, numactl and 'CPUAffinity' on the systemd unit will (as expected) make the forked processes to be pinned to the specific CPUs. I could not find evidence of Docker wasting resources while waiting for containers to be executed so for the time being I will let it run un-pinned.

    Happy to re-open this questions if someone else comes with a better answer.