25.11. Setting global default CPU affinity through manager configuration
The CPUAffinity option in the /etc/systemd/system.conf file defines an affinity mask for the process identification number (PID) 1 and all processes forked off of PID1. You can then override the CPUAffinity on a per-service basis.
Set the default CPU affinity mask for all systemd services by using the /etc/systemd/system.conf file.
Procedure
-
Set the CPU numbers for the
CPUAffinity=option in the[Manager]section of the/etc/systemd/system.conffile. Save the edited file and reload the
systemdservice:# systemctl daemon-reloadReboot the server to apply the changes.
See the
systemd.resource-control(5)man page on your system for more information.