Data Disk Space Allocation

This section describes how to allocate data disk space to nodes so that you can configure the data disk space accordingly.

Allocating Data Disk Space

When creating a node, configure data disks for the node. You can also click Expand and customize the data disk space allocation for the node.

Space Allocation for Container Engines

For a node using a non-shared data disk (100 GiB for example), the division of the disk space varies depending on the container storage Rootfs type Device Mapper or OverlayFS. For details about the container storage Rootfs corresponding to different OSs, see Mapping Between OS and Container Storage Rootfs.

Space Allocation for Pods

The customized pod container space (basesize) is related to the node OS and container storage Rootfs. For details about the container storage Rootfs, see Mapping Between OS and Container Storage Rootfs.

When configuring basesize, consider the maximum number of pods on a node. The container engine space should be greater than the total disk space used by containers. Formula: the container engine space and container image space (90% by default) > Number of containers x basesize. Otherwise, the container engine space allocated to the node may be insufficient and the container cannot be started.

For nodes that support basesize, when Device Mapper is used, although you can limit the size of the /home directory of a single container (to 10 GB by default), all containers on the node still share the thin pool of the node for storage. They are not completely isolated. When the sum of the thin pool space used by certain containers reaches the upper limit, other containers cannot run properly.

In addition, after a file is deleted in the /home directory of the container, the thin pool space occupied by the file is not released immediately. Therefore, even if basesize is set to 10 GB, the thin pool space occupied by files keeps increasing until 10 GB when files are created in the container. The space released after file deletion will be reused but after a while. If the number of containers on the node multiplied by basesize is greater than the thin pool space size of the node, there is a possibility that the thin pool space has been used up.

Mapping Between OS and Container Storage Rootfs

Table 1 Node OSs and container engines in CCE clusters

OS

Container Storage Rootfs

Customized Basesize

EulerOS 2.9

OverlayFS

Supported only by clusters of v1.19.16, v1.21.3, v1.23.3, or later. There are no limits by default.

Not supported if the cluster versions are earlier than v1.19.16, v1.21.3, or v1.23.3.

Ubuntu 22.04

OverlayFS

Not supported.

HCE OS 2.0

OverlayFS

Supported only by Docker clusters. There are no limits by default.

Table 2 Node OSs and container engines in CCE Turbo clusters

OS

Container Storage Rootfs

Customized Basesize

Ubuntu 22.04

OverlayFS

Not supported.

EulerOS 2.9

ECS VMs use OverlayFS.

Supported only when Rootfs is set to OverlayFS and the container engine is Docker. The container basesize is not limited by default.

HCE OS 2.0

OverlayFS

Supported only by Docker clusters. There are no limits by default.

Garbage Collection Policies for Container Images

When the container engine space is insufficient, image garbage collection is triggered.

The policy for garbage collecting images takes two factors into consideration: HighThresholdPercent and LowThresholdPercent. Disk usage exceeding the high threshold (default: 80%) will trigger garbage collection. The garbage collection will delete least recently used images until the low threshold (default: 70%) is met.

Recommended Configuration for the Container Engine Space