Is it relevent to set "requests" values if i'm not using HPA

Hello,
I was wondering if it was really relevant to set “requests” (CPU/MEM) values if I’m not using HPA ?
If those values are not used to scale up or down some pods, what is the point ?
Regards,
Camille.

That’s how: a) the scheduler knows how many pods to put into a node and when that node is “full”; and b) the node knows how to configure the kernel to share resources between pods, rather than being a free for all.

So, “yes”.

1 Like

Thank you very much for this very clear answer.
Do I really have to follow the recommendations to set the values?
For example, for Velero, the recommended requests seem to be 500Mi but, in reality, most of the time the pod consumes only 2Mi. Can I put 2Mi or 5Mi for example without affecting the application? Or can there be unexpected behavior or bugs?

So in summary, is a too low Request can affect the behavior of a pod? Even if I set a very high Limit?

The request is what you are “guaranteed”. You might be able to use more than that, if it is available on the machine when you need it, but it might not be available. You should always be able to use what you have requested.

It’s also worth pointing out that CPU and memory are fundamentally different things. The impact of too little CPU is that you go slower. The impact of too little memory is that you crash. Likewise, “borrowed” CPU is easily reclaimed, but borrowed memory could cause you to be killed (or worse, cause someone else to be killed).

Soy general guidance is:

  1. always set CPU request
  2. never set CPU limit
  3. always set memory request
  4. always set memory limit == request

Reasonable people disagree with me, especially on CPU limits.

2 Likes