Why does a cluster or node show requested memory with a milli (m) unit?
This document (000020185) is provided subject to the disclaimer at the end of this document.
Environment
- RKE
- RKE2
Situation
Why does a cluster or node shows requested memory with a milli (m) unit?
Resolution
CPU resources in Kubernetes are measured in millicpus, or 1/1000th of a CPU core, and 1 CPU Core = 1000m. The API will change any request for a decimal point into millicpus. For example 0.1 is converted into 100m. One hyperthread is considered one core, or 1000m.
Memory resources in Kubernetes are mesured in bytes, and can be expressed as an integer with one of these suffixes: E, P, T, G, M, K - decimal suffixes, or Ei, Pi, Ti, Gi, Mi, Ki - binary suffixes (more commonly used for memory), or omit the suffix altogether. Lowercase "m" notation is not a recommended suffix for memory.
The "m" notation for memory might indicate a misconfiguration, where CPU units are recommended to use that suffix (example: 200m), and Memory units are recommended to use "Mi" (example: 128Mi).
Additional Information
Explanation of Kubernetes CPU resources (https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu ) Explanation of Kubernetes memory resources (https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory )
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000020185
- Creation Date: 06-May-2021
- Modified Date:28-Mar-2024
-
- SUSE Rancher
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com