You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: runtime-config-linux.md
+54Lines changed: 54 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,6 +131,60 @@ Also known as cgroups, they are used to restrict resource usage for a container
131
131
cgroups provide controls to restrict cpu, memory, IO, pids and network for the container.
132
132
For more information, see the [kernel cgroups documentation](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt).
133
133
134
+
The path to the cgroups can to be specified in the Spec via `cgroupsPath`.
135
+
`cgroupsPath` is expected to be relative to the cgroups mount point.
136
+
If not specified, cgroups will be created under '/'.
137
+
Implementations of the Spec can choose to name cgroups in any manner.
138
+
The Spec does not include naming schema for cgroups.
139
+
The Spec does not support [split hierarchy](https://www.kernel.org/doc/Documentation/cgroups/unified-hierarchy.txt).
140
+
The cgroups will be created if they don't exist.
141
+
142
+
```json
143
+
"cgroupsPath": "/myRuntime/myContainer"
144
+
```
145
+
146
+
`cgroupsPath` can be used to either control the cgroups hierarchy for containers or to run a new process in an existing container.
147
+
148
+
Optionally, cgroups limits can be specified via `resources`.
149
+
150
+
```json
151
+
"resources": {
152
+
"disableOOMKiller": false,
153
+
"memory": {
154
+
"limit": 0,
155
+
"reservation": 0,
156
+
"swap": 0,
157
+
"kernel": 0,
158
+
"swappiness": -1
159
+
},
160
+
"cpu": {
161
+
"shares": 0,
162
+
"quota": 0,
163
+
"period": 0,
164
+
"realtimeRuntime": 0,
165
+
"realtimePeriod": 0,
166
+
"cpus": "",
167
+
"mems": ""
168
+
},
169
+
"blockIO": {
170
+
"blkioWeight": 0,
171
+
"blkioWeightDevice": "",
172
+
"blkioThrottleReadBpsDevice": "",
173
+
"blkioThrottleWriteBpsDevice": "",
174
+
"blkioThrottleReadIopsDevice": "",
175
+
"blkioThrottleWriteIopsDevice": ""
176
+
},
177
+
"hugepageLimits": null,
178
+
"network": {
179
+
"classId": "",
180
+
"priorities": null
181
+
}
182
+
}
183
+
```
184
+
185
+
Do not specify `resources` unless limits have to be updated.
186
+
For example, to run a new process in an existing container without updating limits, `resources` need not be specified.
187
+
134
188
## Sysctl
135
189
136
190
sysctl allows kernel parameters to be modified at runtime for the container.
0 commit comments