logo

Don't Be Greedy: Rightsize Your Kubernetes Cluster With Prometheus

2022-10-26

Authors:   David Lorite, Jesus Angel Samitier


Summary

The presentation discusses strategies for right-sizing requests and limits in Kubernetes clusters to optimize resource usage and save costs.
  • Two strategies for right-sizing requests and limits: conservative and aggressive
  • Benefits of right-sizing include better understanding of application performance and discovering issues related to performance
  • QoS classes depend on the memory or request set in workloads
  • Setting limits on requests is a good idea
  • An anecdote is provided to illustrate the impact of right-sizing on resource usage and cost savings
The presentation provides an example of right-sizing a real application in a Kubernetes cluster, resulting in a savings of $75 per month for one workload. The presenter emphasizes the importance of creating easily repeatable workflows to monitor resource usage and creating dashboards to track metrics for all workloads. The presentation also discusses the importance of setting limits on requests and the two strategies for right-sizing requests and limits: conservative and aggressive.

Abstract

Setting the proper limits and requests to a Kubernetes cluster is one of the most challenging tasks engineers have to face. Not doing this could have critical consequences, like outages or astronomical cloud bills. Sometimes, when engineers don't have the full picture of the cluster they're working on, they tend to use more resources than actually needed for their workloads. This is called the "greedy developer" problem. To avoid this, you'll have not only to identify the unused resources, containers without limits, or very tight ones. But also to set the right requests and limits. In this talk, Jesus and David will walk you through this process. You might have to add new nodes, or just resize your workloads. Since every cluster is different, also measure the optimizations made, to help our audience with their own clusters.

Materials: