Image Acceleration
AI DataLake provides the image acceleration feature. It allows you to pull images from SWR, open-source, or self-hosted image repositories in advance, create image snapshots, and cache image data locally. You can create an image snapshot for a built-in or custom image version. When an endpoint container starts, the cached image snapshot can be reused directly, eliminating the need to download the image from the SWR image repository and shortening startup times.
If an image snapshot exists for the selected image version, the snapshot is automatically associated when you select the image. When the endpoint container starts, it automatically uses the snapshot to create image resources, requiring no additional manual steps.
How It Works
An image snapshot needs to be created only once. After that, the locally cached image data can be reused every time a container starts, achieving "one-time pre-caching and reuse on every startup."
Use Cases
- Endpoint startup acceleration: When an endpoint starts a container instance, it directly reuses the cached image snapshot, bypassing the need to download the image. This significantly reduces startup time and improves the user experience.
- Elastic scaling acceleration: When service load increases, endpoints start multiple container instances concurrently without repeating image downloads, reducing service wait time. This helps services quickly respond to load changes.
Notes and Constraints
- All workspaces belonging to the same user share image snapshots.
- By default, each user can create up to 30 image snapshots.
- A maximum of one image snapshot can be created for each image version.
- For details about image snapshot support for each engine endpoint, see Supported Images and Image Snapshots.
Prerequisites
- A built-in or custom image exists in image management, and an image version has been added.
- Image snapshot creation depends on the container runtime environment, which can be provided by any compute resource pool or endpoint (not necessarily the endpoint that uses the image snapshot). Once the environment is ready, you can create an image snapshot.
Creating an Image Snapshot
- Log in to the AI DataLake console.
- In the left navigation pane, choose Image Management to open the image management page.
- Click the Image Acceleration tab to open the Image Acceleration page.
- Click Create Image Snapshot in the upper right corner and set parameters.
Table 1 Parameters for creating an image snapshot Parameter
Description
Snapshot Name
The name of the image snapshot, which is used to identify the snapshot purpose.
The name can contain 1 to 190 characters. It must start with a lowercase letter and end with a digit or lowercase letter. Only lowercase letters, digits, and hyphens (-) are allowed.
Target Image
Select the image version for which you want to create an image snapshot.
Snapshot Retention Period
The number of days for retaining a snapshot after it is created. The snapshot is automatically deleted when the retention period expires.
You can select Permanent or Custom. If you select Custom, the value ranges from 1 to 65,536 days.
- Click OK to start creating the image snapshot.
- View the snapshot status in the image snapshot list. When the status changes from Creating to Available, the snapshot is successfully created.
Viewing an Image Snapshot
- Log in to the AI DataLake console.
- In the left navigation pane, choose Image Management to open the image management page.
- Click the Image Acceleration tab to open the Image Acceleration page.
- In the image snapshot list, view the image snapshot information, including the snapshot name, status, image name, image version, expiration time, and creation time.
Deleting an Image Snapshot
- Log in to the AI DataLake console.
- In the left navigation pane, choose Image Management to open the image management page.
- Click the Image Acceleration tab to open the Image Acceleration page.
- Click Delete in the Operation column of the target image snapshot.
- In the displayed dialog box, review the operation impact and enter DELETE as prompted.
- Click OK.
- An image snapshot in the Creating state cannot be deleted. Wait until the creation is complete.
- After an image snapshot is deleted, newly scheduled container instances must download the image from the SWR image repository. Container startup will be slower than launching from snapshots.
- If an image version is associated with an image snapshot, you must delete the image snapshot before deleting the image version.
What is your overall rating for this page?
Thank 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