krr icon indicating copy to clipboard operation
krr copied to clipboard

Be able to explicitly ask for recommendations based on max/avg mem and/or cpu

Open armenr opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. As a user, I'd love to be able to explicitly select krr recommendations based on:

  • average cpu
  • max cpu
  • average mem
  • max mem

Stretch-goal: Be able to mix and match them

Describe the solution you'd like

Some additional ability to use krr in the following way:

krr --avg-mem --max-cpu

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Writing my own custom strategy (this will take me a bit...would prefer to avoid) or hacking on a copy of the code.

armenr avatar Aug 24 '23 10:08 armenr

This is not hard to be added, but why haven't we added that in a first place:

  • CPU usage tends to be really spiky, so while normally your pod might use 5m, in some random times it might use 500m for a few seconds
  • Memory recommendations should always fit the limit, otherwise you might get an OOMKill (or get it always). So we thought there is no actual usefullness in "average memory". Maybe if you think to set request to "average memory" and limit to "maximum memory"

So, I am mostly thinking out loud here to try to understand if it will be useful to add what you propose. What do you think? Maybe I am missing something?

LeaveMyYard avatar Aug 31 '23 09:08 LeaveMyYard

@LeaveMyYard - You're right about memory, to be honest. That's a VERY good point. MaxMem is the metric, my friend.

It's a nice-to-have metric, but it actually contributes zero value to this specific tool, for its intended use-case - so I concede that fully.

On the subject of Max CPU, I get what you're saying, and it helps to explain the reasoning behind taking the 99th percentile value rather than the absolute max.

armenr avatar Sep 02 '23 08:09 armenr