mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 21:51:33 +00:00
Add support for kernel memory limit
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
@@ -172,6 +172,7 @@ Create a container
|
||||
"LxcConf": {"lxc.utsname":"docker"},
|
||||
"Memory": 0,
|
||||
"MemorySwap": 0,
|
||||
"KernelMemory": 0,
|
||||
"CpuShares": 512,
|
||||
"CpuPeriod": 100000,
|
||||
"CpusetCpus": "0,1",
|
||||
@@ -217,8 +218,9 @@ Json Parameters:
|
||||
for the container.
|
||||
- **User** - A string value specifying the user inside the container.
|
||||
- **Memory** - Memory limit in bytes.
|
||||
- **MemorySwap**- Total memory limit (memory + swap); set `-1` to disable swap
|
||||
- **MemorySwap** - Total memory limit (memory + swap); set `-1` to disable swap
|
||||
You must use this with `memory` and make the swap value larger than `memory`.
|
||||
- **KernelMemory** - Kernel memory limit in bytes.
|
||||
- **CpuShares** - An integer value containing the container's CPU Shares
|
||||
(ie. the relative weight vs other containers).
|
||||
- **CpuPeriod** - The length of a CPU period in microseconds.
|
||||
@@ -387,6 +389,7 @@ Return low-level information on the container `id`
|
||||
"LxcConf": [],
|
||||
"Memory": 0,
|
||||
"MemorySwap": 0,
|
||||
"KernelMemory": 0,
|
||||
"OomKillDisable": false,
|
||||
"NetworkMode": "bridge",
|
||||
"PortBindings": {},
|
||||
|
||||
Reference in New Issue
Block a user