CPUAffinity on snap LXD lxcfs and lxc logfile

Hi, I am experimenting with systemd CPUAffinity and lxd limits.cpu, one thing I notice is several lxc processes on root user do not pin to systemd CPUAffinity.
The processes are:
lxcfs /var/snap/lxd/common/var/lib/lxcfs -p /var/snap/lxd/common/lxcfs.pid
lxd --logfile /var/snap/lxd/common/lxd/logs/lxd.log --group lxd

So my question is do these processes need to be on all cpu threads?
If not how can lock the to only a few select thread cores? Is this a snap config?

Is the 2nd one actually lxd and not lxc?

it is, I corrected it, sorry.

Those 2 programs are the LXD daemon itself and the LXCFS daemon, they are not instance workloads and so will not be affected by limits.cpu setting.

As for controlling them by systemd CPUAffinity Iā€™m not sure that is something that snapd based services allow controlling.

@stgraber ?

1 Like