on linux/systemd the mig-agent.service file could use cgroups
gdestuynder opened this issue · comments
Using cgroups in the service file would allow us to lower mig-agent's priority (specially for I/O) as part of ensuring MIG never takes too many resources.
The settings are easy and nearly free so this seems like a good idea/"can't hurt" kind of safety mechanism.
For ex (see man systemd.directives and systemd.resource-control and kernel doc Documentation/cgroups/blkio-controller.txt):
MemoryLimit=200M
CPUQuota=20%
BlockIOWeight=400
@gdestuynder I want to work on this.
please do :)
Sure. Can you tell me what parameters to be added ?
Part of the work is to figure out the parameters that make sense to add. I would start by running MIG and explore the settings by reading https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt
For example, for MemoryLimit, you need to figure out what a typical MIG workload looks like.
CPUQuota is easier (25% per core seem like a fair arbitrary number for example).
There's plenty of potentially useful settings, but each a decision has to be taken for each of them by observing MIG's behavior.
Got it.