robusta-dev / krr

Prometheus-based Kubernetes Resource Recommendations
MIT License
3.03k stars 158 forks source link

Enable nano unit for CPU requests #356

Open Letme opened 1 week ago

Letme commented 1 week ago

Is your feature request related to a problem? Please describe. I feel like CPU Requests has a 10m minimum, while Memory requests has 100Mi minimum. I have much smaller requests by default as my cluster also holds not that much usage intensive websites.

Describe the solution you'd like Make possibility to say minimum - not to suggest increase to 10m for each usage. I would also go into a nano perspective in such case, and not round to 1m as it happens now

Describe alternatives you've considered I have simply discarded those suggestions, but it prevents automation.

Are you interested in contributing a PR for this? I can provide improvements.

Additional context My cluster has many pods running on 0.8m CPU requests, which then enables better utilization of the available CPU power as simple nginx webserver with PHP or python never uses 10m CPU per container.

aantn commented 1 week ago

Hi @Letme, you should be able to adjust that with --cpu-min and --mem-min flags. You can see more info w/ krr simple --help

Let me know if that works! I don't think we have a flag regarding the rounding but please feel free to open a PR and we'd be happy to review!

Letme commented 1 week ago

That is a solution, indeed. But it does only work with integer, so smallest unit is 1m for CPU. Does anyone use nano or is that just me?

aantn commented 1 week ago

If you are doing it, there are surely others! But we've only used 1m as the smallest amount.

Letme commented 5 days ago

Ok, I have changed the topic of this issue, so that that is more reflected. When I have time I will look a bit if I can easily add nano units to the script.

aantn commented 5 days ago

Thanks!

On Thu, Nov 7, 2024 at 11:24 AM Crt Mori @.***> wrote:

Ok, I have changed the topic of this issue, so that that is more reflected. When I have time I will look a bit if I can easily add nano units to the script.

— Reply to this email directly, view it on GitHub https://github.com/robusta-dev/krr/issues/356#issuecomment-2461721494, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADYUB5EXK5CHRDBZNVDADLZ7MWTZAVCNFSM6AAAAABREOUDE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRRG4ZDCNBZGQ . You are receiving this because you commented.Message ID: @.***>