In this tutorial we will introduce Ocean VPA suggestions and present how to use it. This feature will help you define better resource requirements (based on actual consumption) in order to avoid cluster over\under provisioning, increase the cluster’s efficiency.
Use VPA Guide
Step 1 – Monitoring deployment resource consumption
Ocean will collect usage metrics for all deployments in the cluster periodically, once every 5 minutes. Based on past 2 weeks of collected metrics, Ocean will calculate relevant consumption metric for each resource (CPU and Memory), and base its suggestions upon these calculated metrics.
- Open your Ocean cluster console.
- Under Namespaces, click on the deployment you wish to review to find CPU Utilization and Memory Utilization charts.
Step 2 – Adjusting resource allocation according to actual consumption
Resource suggestions will be provided to help you adjust deployment requests to actual resource usage, per CPU and Memory.
Resource resize recommendations are triggered in case the requested resources are 15% above or below the Avg. metric during the last two weeks.
Navigate to the “Right Sizing” tab under your Ocean cluster.
Review the suggested resources offered for all your deployments.
To deep dive into a specific deployment and review resource suggestion, click on the requested deployment.
Modify your deployment resource requirements by running the following from the command line:
kubectl set resources MyDeployment --requests=cpu=XXX,memory=XXX
Right Sizing Notifications
In addition to the above content, the Right Sizing tab may display one of several notification messages, determined by the status of the Metrics Server reports and the Right Sizing service:
- Indicates that the Metrics Server pod is not yet installed on your cluster.
- Appears when the Metrics Server is installed, but the system has not received any reports.
- Indicates that the last report from the Metrics Server is more than 3 hours old.
- Metrics Server is installed and data is being collected by the Right Sizing service. The progress bar below reflects the amount of data left to collect before suggestions can be displayed.
- Data collection works as intended. There are no suggestions to make, or all previous suggestions have been applied/dismissed.
- Metrics Server is installed, but no data has been received yet. A temporary message that transitions into message #4 once data aggregation is in progress.