1
0
Fork 0

example.container: Add resource accounting

Add 'accounting' and its child-objects 'cgroup' and 'cpu' to control
the container cgroup and cpu usage.

Signed-off-by: Enno Tensing <tenno@suij.in>
This commit is contained in:
Enno Tensing 2025-07-30 10:22:25 +02:00
parent e100abf698
commit 57b983e876
Signed by: tenno
GPG key ID: 95265603BD36E66C

View file

@ -48,5 +48,23 @@
"capabilities": { "capabilities": {
"add": [ "NET_RAW" ], "add": [ "NET_RAW" ],
"drop": [ "CAP_SYS_ADMIN" ] "drop": [ "CAP_SYS_ADMIN" ]
},
"accounting": {
"cgroup": {
"config": ["memory.high=1073741824"],
"parent": "/example-parent",
"namespace": "host",
"how": "enabled"
},
"cpu": {
"period": "100000",
"quota": "100000",
"shares": "1024",
"number": "4",
"cpuset": {
"cpus": "0-3,11-15",
"mems": "0,1"
}
}
} }
} }