0

In kubernetes we can set limits and requests for cpu. If the container exceeds the limit, from my understanding it will be throttled. However if the container exceeds the requested but is still under the limit what would happen?

Would I see performance issues on my application?

user2962698
  • 115
  • 2
  • 9

2 Answers2

1

There won't be any issue if the CPU going above the requested and staying under the limit.

however I have seen, if your application requires 250m of CPU and your requested CPU is 50m you might see the performance issues.

Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102
  • Why is it that there is a performance issue in the situation that you mentioned? Shouldn't the container get allocated with the cpu it needs anyways ? – user2962698 Oct 03 '21 at 13:08
  • Yes definitely it will get resources just seen sometime python app with less requested cpu not performing well, if you allocate little more resource it performs well. – Harsh Manvar Oct 03 '21 at 13:38
  • So it’s more depends on your app however – Harsh Manvar Oct 03 '21 at 13:38
1

However if the container exceeds the requested but is still under the limit what would happen?

Nothing happens. The resource request is used for scheduling your pod to a node with capacity.

If the resources are scarce on your node, it may be evicted.

Jonas
  • 121,568
  • 97
  • 310
  • 388