How to set CPU affinity of balena supervisor?

I am currently running 3 different containers in the same RPI, things working fine. I am now looking at the docker documentation to fine tune the containers by setting parameters such as CPU affinity, memory swappiness and more. In particular, I would like to reserve one CPU core to a process, and let the other processes run on any of the remaining three (running on RPI 3). I am wondering how the balena supervisor, which is itself a container, stands in this scenario. Is it possible to set its CPU affinity? Otherwise, how is it possible to ensure it does not interfere with the rest of the setup?

Thank you.

Hi,
you should be able to set CPU affinity of your application in docker-compose file using the cpuset key. You can have a look at our example project:


As for the supervisor, we consider it a part of the base operating system and as such is ensuring the user application runs properly. We do not expect the user application to tamper with its affinity as this might drive the operating system into an unexpected or unstable state.
Please let us know whether this answers your question and if you need any more assistance.