@@ -130,6 +130,57 @@ Next parameters can be specified:
130130Also known as cgroups, they are used to restrict resource usage for a container and handle
131131device access. cgroups provide controls to restrict cpu, memory, IO, and network for
132132the container. For more information, see the [ kernel cgroups documentation] ( https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt ) .
133+ The path to the cgroups can to be specified in the Spec via ` cgroupsPath ` .
134+ ` cgroupsPath ` is expected to be relative to the cgroups mount point.
135+ If not specified, cgroups will be created under '/' with the base name of the bundle.
136+ The Spec does not support [ split hierarchy] ( https://www.kernel.org/doc/Documentation/cgroups/unified-hierarchy.txt ) .
137+ The cgroups will be created if they don't exist.
138+
139+ ``` json
140+ "cgroupsPath" : " /myRuntime/myContainer"
141+ ```
142+
143+ ` cgroupsPath ` can be used to either control the cgroups hierarchy for containers or to run a new process in an existing container.
144+
145+ Optionally, cgroups limits can be specified via ` resources ` .
146+
147+ ``` json
148+ "resources" : {
149+ "disableOOMKiller" : false ,
150+ "memory" : {
151+ "limit" : 0 ,
152+ "reservation" : 0 ,
153+ "swap" : 0 ,
154+ "kernel" : 0 ,
155+ "swappiness" : -1
156+ },
157+ "cpu" : {
158+ "shares" : 0 ,
159+ "quota" : 0 ,
160+ "period" : 0 ,
161+ "realtimeRuntime" : 0 ,
162+ "realtimePeriod" : 0 ,
163+ "cpus" : " " ,
164+ "mems" : " "
165+ },
166+ "blockIO" : {
167+ "blkioWeight" : 0 ,
168+ "blkioWeightDevice" : " " ,
169+ "blkioThrottleReadBpsDevice" : " " ,
170+ "blkioThrottleWriteBpsDevice" : " " ,
171+ "blkioThrottleReadIopsDevice" : " " ,
172+ "blkioThrottleWriteIopsDevice" : " "
173+ },
174+ "hugepageLimits" : null ,
175+ "network" : {
176+ "classId" : " " ,
177+ "priorities" : null
178+ }
179+ }
180+ ```
181+
182+ Do not specify ` resources ` unless limits have to be updated.
183+ For example, to run a new process in an existing container without updating limits, ` resources ` need not be specified.
133184
134185## Sysctl
135186
0 commit comments