You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MemTotal: all memory installed or provisioned to the system
MemFree: memory without anything in it (wasted)
SReclaimable: This is the part of the slab or “in-kernel data structures cache” that can be reclaimed.
ActiveFile: Amount of buffer or page cache memory that is in active use.
InactiveFile: Amount of buffer or page cache memory that are free and available.
WatermarkLow: Placeholder memory
MemAvailable: A more accurate estimate of how much memory is available. (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0a)
= MemFree + ActiveFile + InactiveFile + SReclaimable
- MIN((ActiveFile + InactiveFile) / 2, WatermarkLow)
- MIN(SReclaimable / 2, WatermarkLow)
- WatermarkLow
MemUnavailable: Memory that is not available for use (kubectl top node).
= MemTotal - MemAvailable
MemFuzzyUsed: A fuzz value for efficient access, see https://github.com/google/cadvisor/issues/3286#issue-1648530485
MemWorkingSet: Active memory usage by the container (kubectl top pods / container_memory_working_set_bytes), also USED to decide if node has enough memory.
= MemFuzzyUsed - InactiveFile
MemoryCapacity: Total amount of memory available on the node.
SystemReserved: Memory reserved for OS system daemons like sshd, udev, etc., disabled by default.
KubeReserved: Memory reserved for Kubernetes system daemons like the kubelet, container runtime, etc., disabled by default.
EvictionThreshold: Memory threshold, when MemWorkingSet > MemoryAllocatable first pod will be evicted on a node, https://github.com/kubernetes/kubernetes/issues/43916#issue-218553580
MemoryAllocatable: Total amount of memory that CAN BE allocated to Kubernetes Pods.
= MemoryCapacity - System-Reserved - Kube-Reserved - Eviction-Thresholds
kubectl top node usage = MemUnavailable per node (node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes)
kubectl top pod usage = MemWorkingSet per pod (container_memory_working_set_bytes = memory.usage_in_bytes - total_inactive_file)
https://www.redhat.com/en/blog/using-oc-adm-top-to-monitor-memory-usage
Example:
Machine highmem-2 => 16GiB RAM
MemoryCapacity = 15933.941Mi
SystemReserved = 1024Mi
KubeReserved = 0
EvictionThreshold = 200Mi
MemoryAllocatable = 15933.941Mi - 1024Mi - 0 - 200Mi = 14709.941Mi