Increasing Reserved System Overhead
For pods running on CCI 2.0, the OS and CCI occupy some underlying resources. In some extreme scenarios, the actual memory usage of a pod may not reach the memory in the pod flavor. To solve this issue, two annotations are provided to reserve the overhead for system components.
The resource.cci.io/memory-reservation annotation specifies whether to enable system overhead reservation. The default value is false, and the value true indicates that system overhead reservation is enabled. After this option is enabled, CCI 2.0 reserves 1 GiB of memory for the system components. If the memory exceeds that in the current pod flavor, the pod flavor is automatically rounded up to a flavor that is lightly larger than the current flavor. You will be billed for the rounded-up pod flavor.
The resource.cci.io/memory-burst-size annotation specifies whether to increase the container memory limits to the memory in the pod flavor. The default value is false, and the value true indicates that this option is enabled. After this option is enabled, the memory limits of all containers in the pod are adjusted to the memory in the pod flavor to increase the upper limit of the cgroup memory in the host environment. After system overhead reservation is enabled, the memory limited by cgroup can be released for application containers after the pod flavor is rounded up.
Scenario |
Pod Configuration |
Resource Requests |
Rounded-up Pod Flavor |
Final Pod Flavor on CCI |
Description |
---|---|---|---|---|---|
The pod has only one container, and only resource requests are configured. System overhead reservation and increasing memory limits to the memory in the pod flavor are enabled. |
annotations: "resource.cci.io/memory-reservation": "true" "resource.cci.io/memory-burst-size": "true" ... containers: - resources: requests: cpu: '1.5' memory: 2Gi |
1.5 vCPUs and 3 GiB of memory |
2 vCPUs and 4 GiB of memory |
containers: - resources: limits: memory: 4Gi requests: cpu: '1.5' memory: 2Gi |
How to calculate the required resources: 1. The pod flavor is rounded up based on the resource requests (1.5c2Gi). 2. System overhead reservation is enabled, and 1 GiB of memory (1.5c3Gi) is added. 3. The pod flavor is rounded up (2c4Gi) based on the rules described in Upgrading Pod Flavors. 4. The container memory limits are increased to the memory (4 GiB) in the pod flavor. |
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