[systemd-devel] restricting resource of a process within a service

Armen Baloyan armen.baloyan at daqri.com
Wed Oct 18 18:27:23 UTC 2017


Hi Colin,

Thank you for you detailed answer.

Best,
Armen

Armen Baloyan | Linux Engineering Lead


On Wed, Oct 18, 2017 at 1:49 AM, Colin Guthrie <colin at mageia.org> wrote:

> Armen Baloyan wrote on 18/10/17 02:21:
> > 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.
> > Is it possible to move this process to a separate cgroup or it cannot be
> > removed its service's cgroup?
>
> I don't think this is supported.
>
> Depending on how your "master" process works and communicates with it's
> 10 processes, you may want to consider splitting your service out into
> separate systemd units. They can all be dependant on each other or,
> depending on your IPC mechanisms, you can use socket or bus activation.
> This then lets you have separate systemd units for each and apply
> whatever accounting and restrictions you may wish on each.
>
> HTHs
>
> Col
>
>
> --
>
> Colin Guthrie
> colin(at)mageia.org
> http://colin.guthr.ie/
>
> Day Job:
>   Tribalogic Limited http://www.tribalogic.net/
> Open Source:
>   Mageia Contributor http://www.mageia.org/
>   PulseAudio Hacker http://www.pulseaudio.org/
>   Trac Hacker http://trac.edgewall.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20171018/72c148f7/attachment.html>


More information about the systemd-devel mailing list