carbon-config

config submodule of carbon-core-system
git clone https://ccx.te2000.cz/git/carbon-config
Log | Files | Refs

commit 1e439f4c25ee28858c0d0d355a2f865059d0208c
parent 2ee7a1617da227c67adc2ff859a439e2bc5abf7e
Author: Jan Pobříslo <ccx@te2000.cz>
Date:   Fri, 16 Dec 2022 22:22:53 +0100

Cgroups configuration via cgroup-tools and cgconfig.conf

Diffstat:
Aetc/cgconfig.conf | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ms6-rc.aat | 6++++++
Ms6-rc.fileset | 10++++++++++
3 files changed, 77 insertions(+), 0 deletions(-)

diff --git a/etc/cgconfig.conf b/etc/cgconfig.conf @@ -0,0 +1,61 @@ +group containers { + memory { } + pids { } +} + +group containers/ccx { + memory { + # 10G + memory.high = 10737418240; + + # 12G + memory.max = 12884901888; + } + pids { + pids.max = 4096; + } +} + +group containers/ccx/xsession.5 { + memory { + # 6G + memory.high = 6442450944; + + # 8G + memory.max = 8589934592; + } +} + +group containers/ccx/alpine-browsers { + memory { + # 8G + memory.high = 8589934592; + + # 10G + memory.max = 10737418240; + } +} + +group containers/ccx/void-recombee-browsers { + memory { + # 8G + memory.high = 8589934592; + + # 10G + memory.max = 10737418240; + } +} + +# ├── containers +# │   ├── ccx +# │   │   ├── alpine-browsers +# │   │   ├── alpine-dev +# │   │   ├── alpine-recombee +# │   │   ├── alpine-sndio +# │   │   ├── mail +# │   │   ├── profanity +# │   │   ├── void-recombee-browser +# │   │   ├── void-signal +# │   │   ├── void-telegram +# │   │   ├── weechat +# │   │   └── xsession.5 diff --git a/s6-rc.aat b/s6-rc.aat @@ -125,6 +125,12 @@ @endfor |end() +|start_oneshot("cgroups", "mount-run-cgroup2") +|in_bundle("ok-sysinit") +|up() + cgconfigparser -l /current/conf/etc/cgconfig.conf +|end() + |start_oneshot("mdevd-coldplug", "mount-dev mount-sys modules mdevd") |up() mdevd-coldplug diff --git a/s6-rc.fileset b/s6-rc.fileset @@ -568,6 +568,15 @@ CN foreground { modprobe af_packet } foreground { modprobe xhci_pci } m644 +/cgroups d m755 +/cgroups/type cN oneshot m644 +/cgroups/dependencies +C mount-run-cgroup2 +m644 +/cgroups/up +CN cgconfigparser -f /current/conf/etc/cgconfig.conf +m644 + /mdevd-coldplug d m755 /mdevd-coldplug/type cN oneshot m644 /mdevd-coldplug/dependencies @@ -1201,6 +1210,7 @@ m644 /ok-sysinit/contents C mount-sysinit dev-coldplug + cgroups udev m644