avoid CPU throttling and achieve predictable performance
The performance of your application is critical to provide the best possible customer experience. While performance is impacted by multiple factors, you should roll out the frequent CPU throttling due to resources starvation. Magalix provides recommendations to avoid CPU throttling.
Step 1 - Understand Performance Recommendation
You will see recommendations suggesting adjustments to the allocated CPU under the Utilization category. It depends heavily on how much your container use of CPU is being throttled.
A recommendation will tell you the required action and all relevant context around it.
Utilization issues impacting your containers require you to adjust the requests and limits of each resource, i.e. CPU or memory. The required action will be quantified to just the right values that your container needs to avoid idling your cluster with too many resources allocated and also to make sure that your containers won't starve if not enough CPU/memory allocated to that container.
This section tells how much resources you are going to save if you apply the recommended values of resources requests and limits. It helps you to assess the impact of that recommendation.
This section explains what Magalix agent was able to observe about the container's resources consumption vs currently allocated to that container. It provides an explainer to the collected evidence.
This section shows the relevant metric that the Magalix agent collected. For example, in the above snapshot, the container was using around 0.5GB of memory while around 8.2 GBs were allocated to that container.
How to Resolve the Issue
Resources issues at container level are usually fixed by manually adjusting the requests and limits of CPU/memory. In this particular type of recommendation, you can either adjust the values manually or enable the autopilot. Magalix agent will adjust them automatically for you.
Resources to Learn More
If you would like to learn more about resource allocation inside Kubernetes and how to manage them, you will find this section handy. We are linking to official Kubernetes documentation and also our more detailed explainer articles.
Let Magalix help you implement best practices for Kubernetes and cloud-native, with your team. explore what you can do with Magalix Console.
Step 2 - Enable Autopilot
Magalix can automate resources optimization for you with very high frequency. Enabling the autopilot will allow Magalix agent to execute those recommendations for you on an hourly basis.
Controlling the Autopilot at the Container Level
You can enable or disable the autopilot at the container level. You can also set the autopilot at the namespace level. In this case, all containers/pods running under that namespace will have Autopilot enabled. But you can turn it off for some containers if needed.
- ON means that it is always on regardless of the namespace-level value.
- OFF means that the Autopilot is always off, regardless of the namespace-level value.
- Auto means that the Autopilot is on or off depending on the namespace-level value.