View previous topic :: View next topic |
Author |
Message |
jhon987 Guru
Joined: 18 Nov 2013 Posts: 302
|
Posted: Wed Jan 10, 2018 11:02 pm Post subject: cgroups to limit memory (e.g. prevent swap freezes) |
|
|
So I read that one could use cgroups in order to avoid system freezes due to swapping run away memory usage (https://superuser.com/questions/1115983/prevent-system-freeze-unresponsiveness-due-to-swapping-run-away-memory-usage) - is that true?
If so, can someone please explain how to apply it on Gentoo because the example in the guide (https://wiki.gentoo.org/wiki/OpenRC/CGroups) is a bit unclear to me.
On my case, freezes occur upon emerging large packages: chromium, clang, etc... According to TOP the process that hogs all the RAM is cc1plus,
so had I wanted to avoid swap and freeze what values should I be inserting here:
rc_cgroup_${CONTROLLER_NAME}="${CONTROLLER_NAME}.${OPTION_NAME} ${OPTION VALUE}"
Would this be OK:
rc_cgroup_memory="memory.max 8132972 pids.max max" (note the memory units I used is KiB should I use bytes?)
Or, am I completely off track? |
|
Back to top |
|
|
bunder Bodhisattva
Joined: 10 Apr 2004 Posts: 5947
|
|
Back to top |
|
|
jhon987 Guru
Joined: 18 Nov 2013 Posts: 302
|
Posted: Thu Jan 11, 2018 10:28 am Post subject: |
|
|
Yeah, tnx.
I bumped into that documentation, but was hoping someone could shorten things for me, I guess not...
Well, time to dig into that ugly doc, man, it look so windows 93 style with that grey background.
Still, any straightforward answers would be appreciated (i.e. answers that don't redirect me to another resource). |
|
Back to top |
|
|
|
|
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
|
|