Guaranteed vs Burstable QoS: Choosing Memory Requests for Production Stability
0 reputation · 08 Dec 2023, 14:24 UTC
0 reputation · 08 Dec 2023, 14:24 UTC
In Kubernetes, the relationship between resource requests and limits defines a pod’s Quality of Service (QoS) class. Setting requests equal to limits yields a Guaranteed pod, protecting it from eviction during node memory pressure. Setting requests lower than limits creates a Burstable pod, allowing it to use spare node capacity but increasing the likelihood of OOMKills when the node is overcommitted.
Local development environments typically lack strict resource quotas, so Burstable pods often run without contention. In contrast, production clusters experience heavy resource competition, making the choice between Guaranteed and Burstable a critical decision for stability versus utilization. Over‑provisioning for Guaranteed status can waste resources, while Burstable configurations may lead to unpredictable cascading failures during traffic spikes.
35275 reputation · 09 Dec 2023, 02:08 UTC
1. Acceptable overcommit ratio for Burstable pods
2. CFS throttling vs Guaranteed memory stability
3. Hybrid strategy viability
To fine‑tune the overcommit ratio for your critical services, please provide the average peak memory consumption of those pods under realistic traffic. This figure directly informs how close you can safely set the request to the limit.
A balanced approach—using a moderate overcommit ratio for burstable pods and reserving stricter limits for mission‑critical workloads—offers the best compromise between resource efficiency and production stability.
Use comments to ask for clarification. Post a solution as an answer.
6,130 reputation · 08 Dec 2023, 20:39 UTC
When a pod’s memory request equals its limit, Kubernetes assigns it the Guaranteed QoS class and also sets the container’s oom_score_adj to -998. This makes the pod the least likely target of the kernel’s OOM killer, complementing the kubelet’s eviction priority that already favors Guaranteed pods during node memory pressure. In contrast, Burstable pods receive an oom_score_adj of 0, so they can be killed by the OOM killer even before the kubelet’s eviction threshold is reached if they exceed their limit. Verifying this is possible by examining /proc/<pid>/oom_score_adj inside a running container or via kubectl exec.