Originally posted by Scramblejams
View Post
If that doesn't work and you don't find another dynamic solution, you could try the following static one.
Desktop systems managed by systemd create a scope unit for each desktop application you run. You can see them with systemctl status (ran as your user). You could move Steam and Heroic –and hopefully games launched through them– to your CPU's cache cores by overriding the option AllowedCPUs on their respective scope units with a couple of user drop-ins (usually in ~/.config/systemd/user/) as described in this answer. Ideally the kernel would move non-game processes out of the cores used by your game. In that case, you wouldn't have to configure anything else and your applications would still benefit from your CPU's cache cores when you're not playing.
Otherwise, you could force non-game processes onto your CPU's frequency cores. According to systemd.special(7), systemd puts all system services in system.slice. You could override the option AllowedCPUs on that slice unit with a system drop-in (one in /etc/systemd/system/). Additionally, you could move user services to your CPU's frequency cores with a similar drop-in on user.slice. Kernel processes would not be affected and might still run on your CPU's cache cores, though. And, in any case, you'd be wasting half of your CPU while not playing.
Leave a comment: