Merge pull request #704 from hqhq/use_uint64_for_memory
Set specs value the same as kernel API input
This commit is contained in:
commit
40474dd78c
|
@ -285,15 +285,15 @@ For more information, see [the memory cgroup man page][cgroup-v1-memory].
|
||||||
|
|
||||||
The following parameters can be specified to setup the controller:
|
The following parameters can be specified to setup the controller:
|
||||||
|
|
||||||
* **`limit`** *(int64, OPTIONAL)* - sets limit of memory usage in bytes
|
* **`limit`** *(uint64, OPTIONAL)* - sets limit of memory usage in bytes
|
||||||
|
|
||||||
* **`reservation`** *(int64, OPTIONAL)* - sets soft limit of memory usage in bytes
|
* **`reservation`** *(uint64, OPTIONAL)* - sets soft limit of memory usage in bytes
|
||||||
|
|
||||||
* **`swap`** *(int64, OPTIONAL)* - sets limit of memory+Swap usage
|
* **`swap`** *(uint64, OPTIONAL)* - sets limit of memory+Swap usage
|
||||||
|
|
||||||
* **`kernel`** *(int64, OPTIONAL)* - sets hard limit for kernel memory
|
* **`kernel`** *(uint64, OPTIONAL)* - sets hard limit for kernel memory
|
||||||
|
|
||||||
* **`kernelTCP`** *(int64, OPTIONAL)* - sets hard limit in bytes for kernel TCP buffer memory
|
* **`kernelTCP`** *(uint64, OPTIONAL)* - sets hard limit in bytes for kernel TCP buffer memory
|
||||||
|
|
||||||
* **`swappiness`** *(uint64, OPTIONAL)* - sets swappiness parameter of vmscan (See sysctl's vm.swappiness)
|
* **`swappiness`** *(uint64, OPTIONAL)* - sets swappiness parameter of vmscan (See sysctl's vm.swappiness)
|
||||||
|
|
||||||
|
@ -414,7 +414,7 @@ Each entry has the following structure:
|
||||||
|
|
||||||
* **`pageSize`** *(string, REQUIRED)* - hugepage size
|
* **`pageSize`** *(string, REQUIRED)* - hugepage size
|
||||||
|
|
||||||
* **`limit`** *(int64, REQUIRED)* - limit in bytes of *hugepagesize* HugeTLB usage
|
* **`limit`** *(uint64, REQUIRED)* - limit in bytes of *hugepagesize* HugeTLB usage
|
||||||
|
|
||||||
###### Example
|
###### Example
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"limit": {
|
"limit": {
|
||||||
"$ref": "defs.json#/definitions/int64"
|
"$ref": "defs.json#/definitions/uint64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
@ -178,23 +178,23 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"kernel": {
|
"kernel": {
|
||||||
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernel",
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernel",
|
||||||
"$ref": "defs.json#/definitions/int64"
|
"$ref": "defs.json#/definitions/uint64"
|
||||||
},
|
},
|
||||||
"kernelTCP": {
|
"kernelTCP": {
|
||||||
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernelTCP",
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernelTCP",
|
||||||
"$ref": "defs.json#/definitions/int64"
|
"$ref": "defs.json#/definitions/uint64"
|
||||||
},
|
},
|
||||||
"limit": {
|
"limit": {
|
||||||
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/limit",
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/limit",
|
||||||
"$ref": "defs.json#/definitions/int64"
|
"$ref": "defs.json#/definitions/uint64"
|
||||||
},
|
},
|
||||||
"reservation": {
|
"reservation": {
|
||||||
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/reservation",
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/reservation",
|
||||||
"$ref": "defs.json#/definitions/int64"
|
"$ref": "defs.json#/definitions/uint64"
|
||||||
},
|
},
|
||||||
"swap": {
|
"swap": {
|
||||||
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swap",
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swap",
|
||||||
"$ref": "defs.json#/definitions/int64"
|
"$ref": "defs.json#/definitions/uint64"
|
||||||
},
|
},
|
||||||
"swappiness": {
|
"swappiness": {
|
||||||
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swappiness",
|
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swappiness",
|
||||||
|
|
|
@ -225,7 +225,7 @@ type LinuxHugepageLimit struct {
|
||||||
// Pagesize is the hugepage size
|
// Pagesize is the hugepage size
|
||||||
Pagesize string `json:"pageSize"`
|
Pagesize string `json:"pageSize"`
|
||||||
// Limit is the limit of "hugepagesize" hugetlb usage
|
// Limit is the limit of "hugepagesize" hugetlb usage
|
||||||
Limit int64 `json:"limit"`
|
Limit uint64 `json:"limit"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LinuxInterfacePriority for network interfaces
|
// LinuxInterfacePriority for network interfaces
|
||||||
|
@ -281,15 +281,15 @@ type LinuxBlockIO struct {
|
||||||
// LinuxMemory for Linux cgroup 'memory' resource management
|
// LinuxMemory for Linux cgroup 'memory' resource management
|
||||||
type LinuxMemory struct {
|
type LinuxMemory struct {
|
||||||
// Memory limit (in bytes).
|
// Memory limit (in bytes).
|
||||||
Limit *int64 `json:"limit,omitempty"`
|
Limit *uint64 `json:"limit,omitempty"`
|
||||||
// Memory reservation or soft_limit (in bytes).
|
// Memory reservation or soft_limit (in bytes).
|
||||||
Reservation *int64 `json:"reservation,omitempty"`
|
Reservation *uint64 `json:"reservation,omitempty"`
|
||||||
// Total memory limit (memory + swap).
|
// Total memory limit (memory + swap).
|
||||||
Swap *int64 `json:"swap,omitempty"`
|
Swap *uint64 `json:"swap,omitempty"`
|
||||||
// Kernel memory limit (in bytes).
|
// Kernel memory limit (in bytes).
|
||||||
Kernel *int64 `json:"kernel,omitempty"`
|
Kernel *uint64 `json:"kernel,omitempty"`
|
||||||
// Kernel memory limit for tcp (in bytes)
|
// Kernel memory limit for tcp (in bytes)
|
||||||
KernelTCP *int64 `json:"kernelTCP,omitempty"`
|
KernelTCP *uint64 `json:"kernelTCP,omitempty"`
|
||||||
// How aggressive the kernel will swap memory pages. Range from 0 to 100.
|
// How aggressive the kernel will swap memory pages. Range from 0 to 100.
|
||||||
Swappiness *uint64 `json:"swappiness,omitempty"`
|
Swappiness *uint64 `json:"swappiness,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue