Merge pull request #64 from cyphar/add-pids-cgroup

spec: linux: add support for the PIDs cgroup
This commit is contained in:
Alexander Morozov 2015-09-03 21:09:55 -07:00
commit 527a3eec38
2 changed files with 8 additions and 1 deletions

View File

@ -128,7 +128,7 @@ Next parameters can be specified:
## Control groups
Also known as cgroups, they are used to restrict resource usage for a container and handle
device access. cgroups provide controls to restrict cpu, memory, IO, and network for
device access. cgroups provide controls to restrict cpu, memory, IO, pids and network for
the container. For more information, see the [kernel cgroups documentation](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt).
## Sysctl

View File

@ -129,6 +129,11 @@ type CPU struct {
Mems string `json:"mems"`
}
type Pids struct {
// Maximum number of PIDs. A value < 0 implies "no limit".
Limit int64 `json:"limit"`
}
// Network identification and priority configuration
type Network struct {
// Set class identifier for container's network packets
@ -145,6 +150,8 @@ type Resources struct {
Memory Memory `json:"memory"`
// CPU resource restriction configuration
CPU CPU `json:"cpu"`
// Task resource restriction configuration.
Pids Pids `json:"pids"`
// BlockIO restriction configuration
BlockIO BlockIO `json:"blockIO"`
// Hugetlb limit (in bytes)