On Di, 17.10.17 18:21, Armen Baloyan ([email protected]) wrote:

> Hi,
> 
> I need to restrict CPU usage for a process that runs in a service. The
> service has over 10 processes running but I need to put restrictions only
> on 1 of those processes.

As Colin already pointed out, the usual way is to split up that
service into multiple services that can be individually managed in
regards to resource consumption.

Note that if you want to limit he total CPU time consumption you can use classic
UNIX resource limits for this, i.e. RLIMIT_CPU. But this puts a hard
limit on the total CPU runtime, it's not a way to say "this processes
gets only 10% of the cpu time of each second runtime"...

> Is it possible to move this process to a separate cgroup or it cannot be
> removed its service's cgroup?

You can open a scope unit for a specific process, programatically via D-Bus.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to