1 |
On Sun, Apr 30, 2017 at 4:17 PM, Kai Krakow <hurikhan77@×××××.com> wrote: |
2 |
> Am Sun, 30 Apr 2017 10:33:05 -0700 |
3 |
> schrieb Jorge Almeida <jjalmeida@×××××.com>: |
4 |
> |
5 |
>> It makes sense that the kernel has it. Should it be enabled? For a |
6 |
>> server, probably. For a single-user workstation? Maybe. |
7 |
> |
8 |
> Maybe I don't have the ordinary workstation, but I use it to limit |
9 |
> memory of sometimes-run-away services (memory-wise) and to control |
10 |
> resource usage of container machines I'm using during development. |
11 |
> Probably not the ordinary use-case... |
12 |
> |
13 |
|
14 |
Honestly, I can't think of why you wouldn't want to use it. |
15 |
|
16 |
The use cases of killing orphan processes and managing resources at a |
17 |
service level have already been mentioned. |
18 |
|
19 |
Another use case is that the kernel automatically takes cgroups into |
20 |
account when scheduling. So, if one of your services launches a bunch |
21 |
of children they'll be weighted together when allocating CPU. That |
22 |
means that a service with ten threads won't get 10x the CPU of a |
23 |
service with one thread if CPU becomes limiting, assuming equal |
24 |
niceness/etc. On a multi-user system the same would apply to the user |
25 |
running 100 processes vs 1. |
26 |
|
27 |
I also use cgroups to monitor memory use/etc at a service level. |
28 |
|
29 |
Sure, they're somewhat optional, but they're a pretty useful kernel feature. |
30 |
|
31 |
-- |
32 |
Rich |