Home > Software design >  What is CPU Request Commitment and Memory Request Commitment
What is CPU Request Commitment and Memory Request Commitment

Time:03-07

enter image description here Can't find a good article on Google that explains this well or at all so turning to the dev community to help me understand.

My guess is that if CPU Request Commitment/Memory Request Commitment says it's over 100% then it means the total resources.requests.cpu/resources.requests.memory in all of my yaml files exceeds the total available CPU/Memory on my node. Is that a correct assumption?

I'm talking about these settings in my yaml files:

            resources:
              requests:
                cpu: <Your value>
                memory: <Your value>

CodePudding user response:

From: https://www.metricfire.com/blog/tips-for-monitoring-kubernetes-applications/:

CPU request commitment is the ratio of CPU requests for all pods running on a node to the total CPU available on that node. In the same way, memory commitment is the ratio of pod memory requests to the total memory capacity of that node. We can also calculate cluster level request commitment by comparing CPU/memory requests on a cluster level to total cluster capacity.

CodePudding user response:

here is a good video that explains how it works:

https://www.youtube.com/watch?v=xjpHggHKm78&feature=emb_title

basically, when a pod request 1 CPU, kubernetes will guarantee that the pod will get 1 CPU, but when the pod want to use more than 1 CPU, kubernetes will give it if it is available, in this case, you will see more than 100% of CPU usage (100% from the CPU allocated to the pod, not in the node)

  • Related