On Sun, Apr 30, 2017 at 4:17 PM, Kai Krakow <hurikha...@gmail.com> wrote:
> Am Sun, 30 Apr 2017 10:33:05 -0700
> schrieb Jorge Almeida <jjalme...@gmail.com>:
>
>> It makes sense that the kernel has it. Should it be enabled? For a
>> server, probably. For a single-user workstation? Maybe.
>
> Maybe I don't have the ordinary workstation, but I use it to limit
> memory of sometimes-run-away services (memory-wise) and to control
> resource usage of container machines I'm using during development.
> Probably not the ordinary use-case...
>

Honestly, I can't think of why you wouldn't want to use it.

The use cases of killing orphan processes and managing resources at a
service level have already been mentioned.

Another use case is that the kernel automatically takes cgroups into
account when scheduling.  So, if one of your services launches a bunch
of children they'll be weighted together when allocating CPU.  That
means that a service with ten threads won't get 10x the CPU of a
service with one thread if CPU becomes limiting, assuming equal
niceness/etc.  On a multi-user system the same would apply to the user
running 100 processes vs 1.

I also use cgroups to monitor memory use/etc at a service level.

Sure, they're somewhat optional, but they're a pretty useful kernel feature.

-- 
Rich

Reply via email to