systemd managing cgroups: assign specific binary to a cgroup

2

SHORT VERSION: I would like systemd to assign any instance of the rsync binary to a specific cgroup, automatically. How do I set up systemd to do this?

LONG VERSION: When I run rsync for (large) backups I need to limit the memory usage because otherwise rsync will use up all the RAM as file buffer, and the system as a whole will become unresponsive to other tasks. I used to manage this by assigning the rsync binary automatically to a certain cgroup with a 512MB memory restriction, via /etc/cgrules.conf and the cgred.service (CGroup Rules Engine Daemon)

How do I do this with systemd now that cgred is gone? I'm on Fedora 25, and when I did a dnf update yesterday, cgred.service was removed, presumably being replaced by systemd. And my rsync jobs eat all the memory and makes the system dreadfully slow.

reikred

Posted 2017-07-12T19:16:59.467

Reputation: 253

No answers