Message boards :
Number crunching :
Resource Management with Systemd and Cgroups: Setting CPU Affinity in Linux
Message board moderation
Joined: 17 Jun 21
Because I had to read a lot of docs before I found the solution to my problem I am posting this here to help anyone else that may come along in the future.
I have a nice beefy Ryzen 9 system that I use as my crunching box and as a gaming server. It's running OpenSuse Linux. In order to keep the two roles from competing from resources I have the game servers installed in LXD containers and set them to us one half CPUs on my system. I was running my Atlas native tasks in a VM that I configured to use the other half of the CPU be Singularity can't run in an LXD container. However I was loosing a crunching power to the overhead of the VM. After stumbling through several false start I finally learned how to set CPU affinity for services using Systemd:
sudo systemctl set-property autofs.service AllowedCPUs=8-15,24-31 sudo systemctl set-property boinc-client.service AllowedCPUs=8-15,24-31
It's as simple as that. Now I am crunching without the VM on exactly half my CPU cores while my game servers use the other half.