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:
parent
e100abf698
commit
57b983e876
1 changed files with 18 additions and 0 deletions
|
@ -48,5 +48,23 @@
|
|||
"capabilities": {
|
||||
"add": [ "NET_RAW" ],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue