Magalix is continuously investing in fine-tuning their KubeOptimizer recommendations to make sure that the applications on our users clusters are performant and cost effective. However, with so many different strategies in capacity management, there is a growing need from our users to have the ability to customize key variables on how our algorithms work in order to better fit their strategy.
Listening to this feedback, we started to expose KubeOptimizer key variables (one at a time) in our console UI as part of Resource Advisor Settings, to make it easy for our users to adjust them according to their strategy.
Below we are going to address each setting, why you might wanna change it, and how to do it.
CPU & Memory min.request
It’s a known best practice to set request value for your workloads, for both CPU and Memory, to make sure each workload has guaranteed resources they can get once they are scheduled on the clusters.
KubeOptimizer algorithms goal is to find the best request value for your workload based on its usage metrics history, and one key scenario to consider is workloads with very low utilization (near zero utilization). For a near zero utilization scenario, you still want to assign a request value, not too little that it causes throttling or OOM kills, and not too high that it affects other workloads and causes a lot of waste. KubeOptimizer handles that scenario by recommending a min.request value to be assigned to these workloads, the exact default value for it comes from our experience analyzing dozens of clusters data.
So why do you want to change that value?
There are different reasons to change the min.request values, but the major one is having a huge number of workloads running on near zero utilization, which means even if min.request value is small, it is multiplied by this huge number which results in a lot of resources waste. Depending on your strategy you might find better to adjust our default min.request to a smaller number to avoid huge waste.
How to do it?
You can the min.request settings as follows:
- Click on KubeOptimizer menu item from left side menu
- In KubeOptimizer advisors list, click on Container Resource Advisor
- In the Container Resource Advisor page, you will find the min.request settings for both CPU and Memory where you can change the values according to your strategy and save these changes.