2 minute read
Kubernetes’ users often config request and limit based on empirical values when creating application resources. Based on the resource recommendation algorithm, you can analyze the actual application usage and recommend more appropriate resource configurations. You can use the resource recommendation algorithm to improve the resource utilization of the cluster.
The algorithm model adopts VPA’s Moving Window algorithm for recommendation
Workloads that have no Pods: If the workload does not have Pods, analysis cannot be performed
Adopt VPA Moving Window algorithm to calculate CPU and Memory for every container and give recommendation config.
Record recommended resource to Metric:crane_analytics_replicas_recommendation
Support StatefulSet and Deployment by default,but all workloads that support Scale SubResource
are supported.
Configuration items | Default | Description |
---|---|---|
cpu-sample-interval | 1m | Metric sampling interval for requesting CPU monitoring data |
cpu-request-percentile | 0.99 | Target CPU Percentile that used for VPA |
cpu-request-margin-fraction | 0.15 | CPU recommend value margin factor,0.15 means recommended value = recommended value * 1.15 |
cpu-target-utilization | 1 | CPU target utilization,0.8 means recommended value = recommended value / 0.8 |
cpu-model-history-length | 168h | Historical length for CPU monitoring data |
mem-sample-interval | 1m | Metric sampling interval for requesting Memory monitoring data |
mem-request-percentile | 0.99 | Target Memory Percentile that used for VPA |
mem-request-margin-fraction | 0.15 | Memory recommend value margin factor,0.15 means recommended value = recommended value * 1.15 |
mem-target-utilization | 1 | Memory target utilization,0.8 means recommended value = recommended value / 0.8 |
mem-model-history-length | 168h | Historical length for Memory monitoring data |