10 May 2024 02:04 PM
I am seeing this graph in dynatrace 'Infrastructure Observability' for 'Kubernetes'. I have few questions-
1. What is the difference between 'Memory Usage' and 'Memory Requests'?
2. 'Memory limits' ( % of allocatable) shows somewhere between 160% to 240%. What does this mean? I understand it as - memory limit is more than 160% of allocatable. How can it be more than 100% of allocatable? Can some one please explain and clarify?
Thanks,
Ajay
Solved! Go to Solution.
10 May 2024 02:42 PM - edited 10 May 2024 02:44 PM
When you schedule a workload in K8s it is gratend the memory it requests (Memory Requests) and can grow up to the limits (Memory limits) before the scheduler kills it because it is using too much memory. Allocatable memory is the amount the cluster can actually give to deployments (substracting kernel, system processes, etc.. from the total memory) If the sum of memory limits are 160% of the allocatable memory it means that if all the pods were to claim their limits, then the node would go under resource pressure.
I would interpret that the cluster is overcommited. If your limits are set based to realistic expectations of how big those workloads can get, it indicates you could eventually run out of memory resources even before the scheduler starts killing pods for being too big. Nodes would go under memory pressure and the kubelet would start evicting pods to recover resources...