Creating an ACS Pod with an ImageCache accelerates container image pulling and reduces Pod startup time. This topic describes the features, creation, usage, and billing of ImageCache.
How it works
Before running a container, an ACS Pod must pull the specified container image. However, factors like network conditions and container image size can make image pulling the most time-consuming part of the Pod startup process. To accelerate instance startup, ACS provides the ImageCache feature. By pre-creating an ImageCache from a container image, you can create ACS Pods that use the cache. This avoids or reduces the need to download image layers and significantly shortens startup time.
The actual speed improvement depends on factors such as the size of the container image used by the ACS Pod and the network connectivity to the image repository.
Each ImageCache can contain one image. An ImageCache with the Creating status is being built. Once its status changes to Created, it is ready for use.
The time required to create an ImageCache depends on the container image size and the configured network bandwidth. Creation may time out and fail due to issues such as network connectivity problems, authentication failure, or a non-existent repository or tag.
Billing
ImageCache creation phase
There are no charges for the intermediate resources used during ImageCache creation. The first 20 ImageCaches per region are free. If you exceed this quota in a region, the following charges apply:
ImageCache storage fee = Unit price × ImageCache size × ImageCache lifespan
Unit price: CNY 0.18 per GiB/month.
ImageCache size: The size of the pulled and decompressed container image, in GiB.
ImageCache lifespan: Billing starts after the ImageCache is created and stops after it is deleted.
ImageCache usage phase
This fee covers the acceleration cost for the entire lifecycle of a Pod that uses an ImageCache. The billing duration is the same as the Pod's runtime.
ImageCache acceleration fee = Unit price × ImageCache size ×
Unit price: CNY 0.00231 per GiB/hour
ImageCache size: The size of the pulled and decompressed container image, in GiB.
Total runtime of all Pods: When a Pod is launched from an ImageCache, the billed duration covers its entire lifecycle, including image pulling, startup, and execution. The billable duration for the ImageCache acceleration matches the billable duration of the Pod itself. For example, if three Pods are launched using an ImageCache in hour T0, and their individual billable durations are 3,600 seconds, 3,000 seconds, and 600 seconds, the total accelerated duration is 3,600 + 3,000 + 600 = 7,200 seconds.
Considerations
Permissions: Creating an ImageCache creates a Service-Linked Role. Therefore, ensure the RAM user has the
ram:CreateServiceLinkedRolepermission.Quotas and limitations:
After an ImageCache is created, its size is displayed. This value is the total size of the decompressed container image files and the ImageCache index files. ImageCache supports container images with a compressed size of up to 500 GiB.
The default quota for ImageCaches is 200 per region. You can submit a ticket to request a quota increase.
You can create a maximum of 50 ImageCaches concurrently in a single region. Completed ImageCaches do not count towards this limit.
If your ImageCache quota exceeds 10,000, filtering by tag and resource group is ignored when you call the ListImageCaches API. We recommend that you do not use tags and resource groups for management at this scale.
Scope:
Supported regions: ImageCache is available in China (Beijing), China (Shanghai), China (Hangzhou), China (Ulanqab), China (Shenzhen), China (Hong Kong), and Singapore.
Supported image types for CPU instances:
linux/amd64andwindows/amd64. The default islinux/amd64.Supported GPU instances and image types: For GPU instances, ImageCache supports the
G59,G49E, andL20 (GN8IS)instance types, and thelinux/amd64image type. For more information about GPU instance types supported by ACS, see Accelerated compute instance families.The ACS console only supports creating
linux/amd64ImageCaches. To create a Windows ImageCache, use the OpenAPI and set the Platform parameter towindows/amd64.
Network connectivity: When using an existing ImageCache, ensure network connectivity between the Pod and the image repository.
Pull policy: GPU instances only support
imagePullPolicy: Always.
Create an ImageCache
Console
Log on to the Container Compute Service console. In the left-side navigation pane, choose Image Cache.
On the Image Cache page, click Create in the upper-left corner.
Follow the on-screen instructions to configure the region, ImageCache and Access Credential, and network connectivity, and then confirm the creation.
After you create the ImageCache, you can monitor its progress in Create Event.
Parameter
Description
Example
Region
The region where the ImageCache is supported.
China (Beijing)
Image Cache & Access Credentials
Image Cache Name: Must be 2 to 128 characters in length and can contain lowercase letters, digits, and hyphens (-). It cannot start or end with a hyphen.
Image: Select a target image and version from Container Registry (ACR) Enterprise Edition, ACR Personal Edition, or an artifact repository.
Access Credentials: Password-free access is automatically enabled for ACR repositories under the same account, so you do not need to enter an access credential. If you are using an image from a repository other than Alibaba Cloud Container Registry (ACR), you must specify the server as the domain name of the image repository and configure the corresponding username and password.
ImageCache Name:
image-cache-*****Image:
egs-registry.cn-hangzhou.cr.aliyuncs.com/egs/vllm:0.9.0.1-pytorch2.7-cu128-20250612
Network Configuration
Select one of the following methods to pull the container image that you want to cache.
Public network:
Bind a NAT Gateway to the VPC and configure an SNAT rule for the selected vSwitch.
Automatically create or use an existing EIP.
An automatically created EIP is billed based on actual traffic and is automatically released after the ImageCache is created. For more information about billing, see Billing overview.
VPC: For best performance, upload the container image to a Container Registry (ACR) Enterprise Edition instance in the same region and pull it by using the internal VPC address.
Configure this based on your actual network environment.
OpenAPI
Use an ImageCache
Pod annotation | Description |
| Enables the ImageCache matching feature for the Pod. |
After you enable this feature, the Pod automatically matches and uses the optimal ImageCache based on the following criteria:
Image match: The ImageCache image name must exactly match the image specified in the Pod.
Creation time: The most recent, available ImageCache is prioritized.
On the Clusters page, click the name of the target cluster. In the left-side navigation pane, choose Workloads > Pods, and then click Create from YAML.
Use the following YAML to create a Pod and add the annotation to enable the ImageCache matching feature.
Ensure that the network configuration and credentials provide access to the specified image repository.
apiVersion: v1 kind: Pod metadata: labels: name: hello-pod name: hello-pod annotations: image.alibabacloud.com/enable-image-cache: "true" spec: containers: - image: egs-registry.cn-hangzhou.cr.aliyuncs.com/egs/vllm:0.9.0.1-pytorch2.7-cu128-20250612 # Replace with your image address. command: ["/bin/sleep", "infinity"] imagePullPolicy: Always name: hello-pod ports: - containerPort: 8080 protocol: TCP resources: {} securityContext: capabilities: {} privileged: false terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: AlwaysAfter the Pod is created, click its name to go to the Overview page. When the ImageCache matching feature is enabled, the system automatically adds an annotation with information about the matched ImageCache to the Pod.
Function
Parameter
Example
Description
ImageCache hit information
image.alibabacloud.com/matched-image-caches[{"imageCacheId":"imc-*****t15xuii6tz*****","size":30}]The ID and size (in GiB) of the matched ImageCache.