Difference between revisions of "Kubernetes/Requests and Limits, units"
(Created page with ";[https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu Meaning of CPU] Limits and requests for CPU resources are measured in cpu unit...") |
|||
Line 10: | Line 10: | ||
For example, the following represent roughly the same value: | For example, the following represent roughly the same value: | ||
<code>128974848, 129e6, 129M, 128974848000m, 123Mi</code> | <code>128974848, 129e6, 129M, 128974848000m, 123Mi</code> | ||
;CPU units | |||
The CPU resource is measured in CPU units. One CPU, in Kubernetes, is equivalent to: | |||
* 1 AWS vCPU | |||
* 1 GCP Core | |||
* 1 Azure vCore | |||
* 1 Hyperthread on a bare-metal Intel processor with Hyperthreading | |||
Fractional values are allowed. A Container that requests 0.5 CPU is guaranteed half as much CPU as a Container that requests 1 CPU. You can use the suffix m to mean milli. For example 100m CPU, 100 milliCPU, and 0.1 CPU are all the same. Precision finer than 1m is not allowed. | |||
CPU is always requested as an absolute quantity, never as a relative quantity; 0.1 is the same amount of CPU on a single-core, dual-core, or 48-core machine. |
Revision as of 23:33, 7 December 2021
Limits and requests for CPU resources are measured in cpu units. One cpu, in Kubernetes, is equivalent to 1 vCPU/Core for cloud providers and 1 hyperthread on bare-metal Intel processors.
- Meaning of memory
Limits and requests for memory are measured in bytes. You can express memory as a plain integer or as a fixed-point number using one of these suffixes: E, P, T, G, M, k, m (millis). You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
For example, the following represent roughly the same value:
128974848, 129e6, 129M, 128974848000m, 123Mi
- CPU units
The CPU resource is measured in CPU units. One CPU, in Kubernetes, is equivalent to:
- 1 AWS vCPU
- 1 GCP Core
- 1 Azure vCore
- 1 Hyperthread on a bare-metal Intel processor with Hyperthreading
Fractional values are allowed. A Container that requests 0.5 CPU is guaranteed half as much CPU as a Container that requests 1 CPU. You can use the suffix m to mean milli. For example 100m CPU, 100 milliCPU, and 0.1 CPU are all the same. Precision finer than 1m is not allowed.
CPU is always requested as an absolute quantity, never as a relative quantity; 0.1 is the same amount of CPU on a single-core, dual-core, or 48-core machine.