How to limit SystemD units (services) to use only one CPU core

Created: — modified: — tags: cfengine linux links

TL;DR: make a cgroup and assign processes into them, in the systemd .service file

My colleague Ole Herman Schumacher Elgesem wrote a nice article(Cached version) how to do it for CFEngine. Quite useful bit of knowledge! I wonder if you can limit your CPU- and memory-hungry browser in the same way :-)