Resource Specifications
Overview
The bursting add-on can select appropriate resource specifications based on the vCPUs and memory of the workloads to improve resource utilization. This section describes how appropriate resource specifications are selected.
Constraints
- At least one container in each pod to be scheduled to CCI must have the vCPU limit or request.
- The operations described in this section for rounding up resources can only be used for cloud native bursting. The CCI 2.0 console and APIs have separate operations for rounding up pod specifications.
How Resource Specifications Are Calculated
The resource specifications of pods scheduled to CCI are calculated based on the requests and limits of container resources and adjusted to the pod specifications allowed by CCI.
The resource specifications of a pod are calculated based on the following rules:
- Requests and limits of a resource are set to the same value for all app containers and init containers. If a limit is configured, the limit will be applied. If no limit is configured, the request will be applied.
- If requests are not equal to limits, the larger value of the following two items will be applied:
- Sum of limits set for a resource on all app containers
- Maximum resource limit of all init containers
There are some restrictions on pod specifications.
- The number of vCPUs in a pod must be greater than 0.
- After automatic resource adjustment, the number of vCPUs for the pod is 48 or 64 or ranges from 0.25 to 32, the memory is an integer multiple of 1 GiB and ranges from 1 GiB to 512 GiB, and the ratio of vCPUs to memory ranges from 1:2 to 1:8.
How Resource Quotas Are Rounded Up
Assume that the vCPUs and memory are calculated based on the pod resource specifications. The resource specifications are rounded up as follows:
- The number of vCPUs for each app container and init container (except BestEffort containers) in the pod is increased to an integer multiple of 0.25, and the memory to a value greater than or equal to 0.2 GiB.
If the version of the bursting add-on is 1.5.16 or later, container resource specifications will not be rounded up, and only pod resource specifications are rounded up.
- The pod resources are continuously adjusted until the number of vCPUs of the pod is greater than 32 or the memory is greater than 256 GiB.
- The number of vCPUs in the pod is increased to an integer multiple of 0.25, and the memory to an integer multiple of 1 GiB.
- If the ratio of vCPUs to memory of the pod is less than 1:2, the pod memory is increased to a value greater than or equal to twice the number of vCPUs and is an integer multiple of 1 GiB.
- If the ratio of vCPUs to memory of the pod is greater than 1:8, the number of vCPUs for the pod is increased to a value greater than or equal to 1/8 of the memory and is an integer multiple of 0.25.
A BestEffort container is a container that is not configured with requests and limits.
After resource specifications are rounded up, the pod specifications are as follows:
- The number of vCPUs for the pod ranges from 0.25 to 32 or is 48 or 64, and it must be an integer multiple of 0.25.
- The pod memory is an integer ranging from 1 GiB to 256 GiB or is 384 GiB or 512 GiB.
- The ratio of vCPUs to memory is between 1:2 and 1:8.
- virtual-kubelet.cci.io/burst-pod-cpu: 0.5u
- virtual-kubelet.cci.io/burst-pod-memory: 1Gi
Cases of Rounding Up Resource Specifications
Resource Specifications (vCPUs and Memory) |
Specifications Rounded Up (vCPUs and Memory) |
Description |
---|---|---|
37U 37Gi |
The workloads cannot be scheduled to CCI. |
Invalid vCPU quota. |
30U 257Gi |
The workloads cannot be scheduled to CCI. |
If the ratio of vCPUs to memory is greater than 1:8, the number of vCPUs is increased. However, the vCPU quota cannot be met. |
0.35U 0.5Gi |
0.5U 1Gi |
The number of vCPUs is rounded up to an integer multiple of 0.25, and the memory to an integer multiple of 1. The ratio of vCPUs to memory meets the requirements and does not need to be adjusted. |
0.35U 1.5Gi |
0.5U 2Gi |
The number of vCPUs is rounded up to an integer multiple of 0.25, and the memory to an integer multiple of 1. The ratio of vCPUs to memory meets the requirements and does not need to be adjusted. |
0.45U 18Gi |
2.25U 18Gi |
The number of vCPUs is rounded up to an integer multiple of 0.25, and the memory to an integer multiple of 1. If the ratio of vCPUs to memory is greater than 1:8, the number of vCPUs is increased. |
2U 2Gi |
2U 4Gi |
If the ratio of vCPUs to memory is less than 1:2, the memory is increased. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot