Right Sizing
Check out the Automatic Right-Sizing feature!
Ocean ensures pods and tasks are placed on the best possible VM that fits their resource requirements and other scheduling constraints such as labels, attributes, taints, tolerations, and affinity rules.
However, estimating the proper amount of CPU and Memory when assigning resource requests to workloads is also a challenge which teams face when designing Kubernetes or ECS clusters. To address this challenge and create even more resource-efficient clusters, Ocean has implemented a Right Sizing recommendation mechanism.
Ocean monitors workload utilization in real-time and provides recommendations for adjusting the resource requirements for different workload types.
Ocean continuously monitors the cluster CPU and Memory usage and provides recommendations when a workload consumes significantly more or less resources than it requested.
Right Sizing recommendations are provided per container and summarized for the entire workload for easy presentation at a high level. Recommendations per container enable you to easily understand exactly which applications require changes in resource requests and implement those changes quickly.
Applying the changes suggested by those notifications helps utilize resources in the cluster in a more precise manner and lower chances of cluster issues as resulting from under- or over-utilization of resources.
How It Works (Ocean For Kubernetes)
For Ocean Kubernetes clusters, Right Sizing relies on the Metrics Server and initializes recommendations after an initial data collection of four full days.
Once every 5 minutes, the controller queries the Metrics Server for pod utilization (the equivalent of kubectl top pods).
The output produces a single point in time data point for each pod. Ocean then aggregates the data of the pods per workload.
The aggregation is made twice to include both maximum and mean resource utilization values (e.g., max_memory_utilization and mean_memory_utilization), which will be used in the recommendation generation process to ensure that each pod’s utilization is considered properly.
Using the per-workload aggregated data points, Ocean makes recommendations based on a mechanism that tries to even out peaks and troughs in resource demand.
- Recommendations for decreasing resource requests are based on the above calculation using the maximum resource utilization data collected (e.g., max_memory_utilization).
- Recommendations for increasing resource requests are based on the above calculation using the mean resource utilization data collected (e.g., mean_memory_utilization).
Currently, Ocean generates recommendations for Kubernetes deployments, statefulsets, and daemonsets.