Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cgroup question [ANSWERED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3921
Location: Dallas area

PostPosted: Wed Aug 06, 2014 11:05 am    Post subject: Cgroup question [ANSWERED] Reply with quote

If one compiles cgroup options in the kernel, is there a way to turn it off at boot time?
Or is one stuck with simply having two different kernels, one with cgroup on and the other off?

I don't care to debate the merits of cgroup, etc, just want a simple question answered.
And yes, I've googled, and found no definitive answer (unless I missed it)

TIA (and if this is the wrong forum then move it)


Edit to add: I know of the kernel parm but that's only for the memory system part, not the whole thing, unless I'm reading the documentation wrong.
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon


Last edited by Anon-E-moose on Mon Aug 11, 2014 10:51 am; edited 1 time in total
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sat Aug 09, 2014 1:10 pm    Post subject: Reply with quote

Sometimes it is worth to check what*s in the kernel source code. If there is something in the code which indicates a kernel parameter. To be honest i have no clue if there is an option for your question at all.
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 437

PostPosted: Mon Aug 11, 2014 3:14 am    Post subject: Reply with quote

I don't think there is an option to turn off cgroups at runtime, its one of those "If you don't want them, don't mount them, the overhead and having them available but not using them is negligible". You can, however, turn off the individual controllers, however the only one worth disabling is the "memory" cgroup, at it consumes 0.4% for RAM (4MiB per 1GiB) whether its used or not. Note that systemd REQUIRES cgroups (but not any of the controllers).
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3921
Location: Dallas area

PostPosted: Mon Aug 11, 2014 10:51 am    Post subject: Reply with quote

salahx wrote:
I don't think there is an option to turn off cgroups at runtime, its one of those "If you don't want them, don't mount them, the overhead and having them available but not using them is negligible". You can, however, turn off the individual controllers, however the only one worth disabling is the "memory" cgroup, at it consumes 0.4% for RAM (4MiB per 1GiB) whether its used or not. Note that systemd REQUIRES cgroups (but not any of the controllers).


That's pretty much what I thought based on much reading, but I was hoping I was wrong.
It would have been nice if they had put in an on/off switch. Oh well.
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1368
Location: Montréal

PostPosted: Mon Aug 11, 2014 10:04 pm    Post subject: Reply with quote

In /usr/src/linux/Documentation/kernel-parameters.txt you have
Code:
cgroup_disable= [KNL] Disable a particular controller
                        Format: {name of the controller(s) to disable}
                        The effects of cgroup_disable=foo are:
                        - foo isn't auto-mounted if you mount all cgroups in
                          a single hierarchy
                        - foo isn't visible as an individually mountable
                          subsystem
                        {Currently only "memory" controller deal with this and
                        cut the overhead, others just disable the usage. So
                        only cgroup_disable=memory is actually worthy}

You have a special /usr/src/linux/Documentation/cgroups directory for more information.
_________________
Paul
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum