From 13eee6425456d27660f491cdb7149ad4c7467618 Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Mon, 31 Aug 2015 22:15:19 +0800 Subject: [PATCH 1/2] add example json for cgroup Signed-off-by: Lai Jiangshan --- runtime-config-linux.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/runtime-config-linux.md b/runtime-config-linux.md index 1cabc6156..5cc2aa089 100644 --- a/runtime-config-linux.md +++ b/runtime-config-linux.md @@ -131,6 +131,41 @@ Also known as cgroups, they are used to restrict resource usage for a container device access. cgroups provide controls to restrict cpu, memory, IO, and network for the container. For more information, see the [kernel cgroups documentation](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt). +```json + "resources": { + "disableOOMKiller": false, + "memory": { + "limit": 0, + "reservation": 0, + "swap": 0, + "kernel": 0, + "swappiness": -1 + }, + "cpu": { + "shares": 0, + "quota": 0, + "period": 0, + "realtimeRuntime": 0, + "realtimePeriod": 0, + "cpus": "", + "mems": "" + }, + "blockIO": { + "blkioWeight": 0, + "blkioWeightDevice": "", + "blkioThrottleReadBpsDevice": "", + "blkioThrottleWriteBpsDevice": "", + "blkioThrottleReadIopsDevice": "", + "blkioThrottleWriteIopsDevice": "" + }, + "hugepageLimits": null, + "network": { + "classId": "", + "priorities": null + } + } +``` + ## Sysctl sysctl allows kernel parameters to be modified at runtime for the container. From a043252e3198d7eacb849df0b44d7b6d95f4607f Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Mon, 31 Aug 2015 22:22:09 +0800 Subject: [PATCH 2/2] rename the "Control groups" to "Resources" and update the description Signed-off-by: Lai Jiangshan --- runtime-config-linux.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime-config-linux.md b/runtime-config-linux.md index 5cc2aa089..8f036bcfd 100644 --- a/runtime-config-linux.md +++ b/runtime-config-linux.md @@ -125,11 +125,11 @@ Next parameters can be specified: ] ``` -## Control groups +## Resources -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 -the container. For more information, see the [kernel cgroups documentation](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt). +Resources controlling in 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 the container. +For more information, see the [kernel cgroups documentation](https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt). ```json "resources": {