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
Devices is an array specifying the list of devices to be created in the container.
51
51
Next parameters can be specified:
52
52
53
-
* type - type of device: 'c', 'b', 'u' or 'p'. More info in `man mknod`
54
-
* path - full path to device inside container
55
-
* major, minor - major, minor numbers for device. More info in `man mknod`.
53
+
***type** - type of device: `c`, `b`, `u` or `p`. More info in `man mknod`
54
+
***path** - full path to device inside container
55
+
***major, minor** - major, minor numbers for device. More info in `man mknod`.
56
56
There is special value: `-1`, which means `*` for `device`
57
57
cgroup setup.
58
-
* permissions - cgroup permissions for device. A composition of 'r'
59
-
(read), 'w' (write), and 'm' (mknod).
60
-
* fileMode - file mode for device file
61
-
* uid - uid of device owner
62
-
* gid - gid of device owner
58
+
***permissions** - cgroup permissions for device. A composition of `r`
59
+
(read), `w` (write), and `m` (mknod).
60
+
***fileMode** - file mode for device file
61
+
***uid** - uid of device owner
62
+
***gid** - gid of device owner
63
63
64
64
```json
65
65
"devices": [
@@ -146,45 +146,128 @@ The cgroups will be created if they don't exist.
146
146
147
147
`cgroupsPath` can be used to either control the cgroups hierarchy for containers or to run a new process in an existing container.
148
148
149
-
Optionally, cgroups limits can be specified via `resources`.
149
+
You can configure a container's cgroups via the `resources` field of the Linux configuration.
150
+
Do not specify `resources` unless limits have to be updated.
151
+
For example, to run a new process in an existing container without updating limits, `resources` need not be specified.
152
+
153
+
#### Disable out-of-memory killer
150
154
151
155
```json
152
-
"resources": {
153
-
"disableOOMKiller": false,
154
-
"memory": {
155
-
"limit": 0,
156
-
"reservation": 0,
157
-
"swap": 0,
158
-
"kernel": 0,
159
-
"swappiness": -1
160
-
},
161
-
"cpu": {
162
-
"shares": 0,
163
-
"quota": 0,
164
-
"period": 0,
165
-
"realtimeRuntime": 0,
166
-
"realtimePeriod": 0,
167
-
"cpus": "",
168
-
"mems": ""
169
-
},
170
-
"blockIO": {
171
-
"blkioWeight": 0,
172
-
"blkioWeightDevice": "",
173
-
"blkioThrottleReadBpsDevice": "",
174
-
"blkioThrottleWriteBpsDevice": "",
175
-
"blkioThrottleReadIopsDevice": "",
176
-
"blkioThrottleWriteIopsDevice": ""
177
-
},
178
-
"hugepageLimits": null,
179
-
"network": {
180
-
"classId": "",
181
-
"priorities": null
182
-
}
156
+
"disableOOMKiller": false
157
+
```
158
+
159
+
#### Memory
160
+
161
+
```json
162
+
"memory": {
163
+
"limit": 0,
164
+
"reservation": 0,
165
+
"swap": 0,
166
+
"kernel": 0,
167
+
"swappiness": -1
183
168
}
184
169
```
185
170
186
-
Do not specify `resources` unless limits have to be updated.
187
-
For example, to run a new process in an existing container without updating limits, `resources` need not be specified.
171
+
#### CPU
172
+
173
+
```json
174
+
"cpu": {
175
+
"shares": 0,
176
+
"quota": 0,
177
+
"period": 0,
178
+
"realtimeRuntime": 0,
179
+
"realtimePeriod": 0,
180
+
"cpus": "",
181
+
"mems": ""
182
+
}
183
+
```
184
+
185
+
#### Block IO Controller
186
+
187
+
`blockIO` represents the cgroup subsystem `blkio` which implements the block io controller.
188
+
For more information, see the [kernel cgroups documentation about `blkio`](https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt).
189
+
190
+
The following parameters can be specified to setup the block io controller:
191
+
192
+
***`blkioWeight`***(uint16, optional)* - specifies per-cgroup weight. This is default weight of the group on all devices until and unless overridden by per-device rules. The range is from 10 to 1000.
193
+
194
+
***`blkioLeafWeight`***(uint16, optional)* - equivalents of `blkioWeight` for the purpose of deciding how much weight tasks in the given cgroup has while competing with the cgroup's child cgroups. The range is from 10 to 1000.
195
+
196
+
***`blkioWeightDevice`***(array, optional)* - specifies the list of devices which will be bandwidth rate limited. The following parameters can be specified per-device:
197
+
***`major, minor`***(int64, required)* - major, minor numbers for device. More info in `man mknod`.
198
+
***`weight`***(uint16, optional)* - bandwidth rate for the device, range is from 10 to 1000.
199
+
***`leafWeight`***(uint16, optional)* - bandwidth rate for the device while competing with the cgroup's child cgroups, range is from 10 to 1000, cfq scheduler only.
200
+
201
+
You must specify at least one of `weight` or `leafWeight` in a given entry, and can specify both.
202
+
203
+
***`blkioThrottleReadBpsDevice`**, **`blkioThrottleWriteBpsDevice`**, **`blkioThrottleReadIOPSDevice`**, **`blkioThrottleWriteIOPSDevice`***(array, optional)* - specify the list of devices which will be IO rate limited. The following parameters can be specified per-device:
204
+
***`major, minor`***(int64, required)* - major, minor numbers for device. More info in `man mknod`.
205
+
***`rate`***(uint64, required)* - IO rate limit for the device
0 commit comments