skip to Main Content
Welcome to Gimasys!
Hotline: +84 974 417 099 (HCM) | +84 987 682 505 (HN) gcp@gimasys.com

Maximizing Reliability, Minimizing Costs: Right-Sizing Kubernetes Workloads

Do you know how much money you could save by adjusting workload requests to better represent their actual usage? If you're not rightsizing your workloads, you might be overpaying for resources that your workloads aren't even using or worse, putting your workloads at risk for reliability issues due to under provisioning.

As we discussed beforesetting the resources is the most important thing you can do to increase the reliability of your Kubernetes workloads. In this blog we will help you with the second key finding from the report: State of Kubernetes Cost Optimization!

Tối đa hóa độ tin cậy, giảm thiểu chi phí: Định lượng kích cỡ Kubernetes Workloads phù hợp 1“The research … found that workload rightsizing has the biggest opportunity to reduce resource waste.”

State of Kubernetes Cost Optimization Report

According to the results of Google research, workload rightsizing is the most important golden signal. Workload rightsizing measures the capacity of developers to properly use the CPU and memory they have requested for their applications.

Rightsizing is challenging

It can be quite difficult to predict the resource needs of your applications, which historically has not been a concern for developers in traditional data center environments.In traditional data center environments, resources were typically over-provisioned upfront to ensure capacity for peak demand and future growth, so developers didn't need to focus on accurately predicting resource needs as they were covered by the excess capacity, whereas in cloud environments, resources are consumed on-demand. Finding a balance between efficiency and reliability can often feel like a delicate balancing act.

Tools for workload rightsizing 

Có các tools trong Cloud Monitoring và Giao diện người dùng GKE mà bạn có thể sử dụng để định lượng workloads của mình chạy trên GKE Google Kubernetes Engine.

Rightsizing in the console

Workload Cost Optimization tab helps you identify workloads that can be optimized by displaying the resources used versus what’s requested.

Tối đa hóa độ tin cậy, giảm thiểu chi phí: Định lượng kích cỡ Kubernetes Workloads phù hợp 2To take advantage of potential cost savings, you can drill into clusters to see workload level resource recommendations.

To view workload resource recommendations for Deployment objects only

  1. In GKE Cost Optimization.
  2. Select a cluster.
  3. Click Workloads > Cost Optimization.
  4. Choose a Deployment workloads
  5. In the Workload's detail page, select Actions > Scale > Edit Resource Requests

Rightsizing with Cloud Monitoring

Cloud Monitoring provides built-in VPA scale recommendations metrics that you can use to monitor the performance of your workloads and to identify opportunities to rightsize them without the need to create VPA objects.

Tối đa hóa độ tin cậy, giảm thiểu chi phí: Định lượng kích cỡ Kubernetes Workloads phù hợp 3To view these metrics:

  1. Go to Cloud Monitoring > Metric Explore console.
  2. In the Metric dropdown, select the metrics:
  • Memory recommendation:
    Kubernetes Scale > autoscaler > Recommended per replica request bytes
  • Recommended CPU:
    Kubernetes Scale > autoscaler > Recommended per replica request cores

Rightsizing at scale

If you’re interested in viewing recommendations across clusters and projects, We've created a guide that you can use today to help you right-size your GKE workloads at scale. This solution leverages your actual cluster’s metric data and built-in workload recommendations provided by Cloud Monitoring. You can determine the resource requirements for all your workloads without having to create additional VPA autoscaler objects in each of your clusters. The guide walks you through deploying the solution.

Tối đa hóa độ tin cậy, giảm thiểu chi phí: Định lượng kích cỡ Kubernetes Workloads phù hợp 4

In conclusion

In short, sizing your workloads is essential for both cost savings and reliability. By following the tips in this blog, you can ensure that your workloads are using the right amount of resources, which will save you money and increase the reliability of your workloads.

Links to the solution presented in this blog and other useful tools to help you optimize your cluster are listed below:

Download report State of Kubernetes Optimization, review key solutions and follow Gimasys & Google's next blog post!

Back To Top
0974 417 099