Image acceleration

Updated at:

Create accelerated images in Container Registry (ACR) and use them in DSW, DLC, and EAS. Accelerated images use on-demand loading: image data is loaded without a full download and is decompressed online, so containers start faster because only the required image layers are loaded. PAI fully managed services support on-demand loading from ACR repositories by default.

Prerequisites

Convert accelerated images

You can configure automatic conversion at the repository level. When you push an image to the repository, the image is automatically converted to an accelerated image. The conversion time depends on the image size. The original image is not affected.

Note

The accelerated image uses the same namespace and repository name as the original image. The tag format depends on the mode:

  • Index-only mode: The tag is the original tag with the _accelerated suffix. This mode supports only the Containerd runtime. The original image tag cannot be deleted while the accelerated image is in use.

  • Full mode:

    • The tag is the original tag with the _accelerated suffix. This mode supports both Docker and Containerd runtimes.

    • The tag is the original tag with the _containerd_accelerated suffix. This mode supports only the Containerd runtime.

      Images with the _containerd_accelerated suffix cannot be deleted while they are in use.

  1. Log on to the Container Registry console.

  2. In the top navigation bar, select a region.

  3. In the left-side navigation pane, click Instances .

  4. On the Instances page, click the Enterprise Edition instance that you want to manage.

  5. In the left-side navigation pane of the Enterprise instance, choose Repositories > Image Repositories .

  6. On the Image Repositories page, click the target repository name or click Manage in the Actions column.

  7. In the Modify Basic Information dialog box, turn on Image Acceleration , select a mode, and then click OK . After you configure image acceleration, all subsequently pushed images are automatically converted. To receive a notification when the conversion is complete, configure an event notification. For example, set the event filter expression to _accelerated$. For more information, see Event notification.

    • Full mode : Provides the highest acceleration performance. The accelerated image size is approximately 130% of the original image size. Converting a 1 GB image takes approximately 25 seconds. Previously generated image layers aren't regenerated.

    • Index-only mode : Provides approximately 70% of the acceleration performance of Full mode. The accelerated image size is approximately 3% of the original image size. Converting a 1 GB image takes approximately 3 seconds. Image layers that already have indexes aren't regenerated.

      __

      Important

      Index-only mode is in public preview. We recommend that you test this mode in a test environment before using it in production.

      __

      Note

      • Index-only mode supports only images compressed with tar or tgz. Images compressed with other methods such as zstd are not supported.

      • Index-only mode requires the original image to be present. The original image cannot be deleted while the accelerated image is in use. Full mode can use the accelerated image independently.

      • Index-only mode does not support the Docker runtime.

Use accelerated images in DLC, DSW, or EAS

After conversion, the accelerated image uses the same namespace and repository name as the original image. The tag is the original tag with the _accelerated suffix. You can use accelerated images as custom images in DLC and DSW.

Create a DLC job with an accelerated image

Create a DLC job in a workspace. The following list describes the key parameters. For other parameters, see the DLC topic Create a training job.

  • Image config: Select Image Address and enter the accelerated image address. The format is the standard image URL with the _accelerated suffix.

  • VPC: When you use public resource groups, configure VPC access. Select the VPC that is associated with the Enterprise ACR instance.

Create a DSW instance with an accelerated image

Create a DSW instance in a workspace. The following list describes the key parameters. For other parameters, see the DSW topic Create a DSW instance.

  • Image config: On the tab, enter the accelerated image address. The format is the standard image URL with the _accelerated suffix.

  • VPC: When Resource Type is set to Public Resource Group, configure the VPC. Select the VPC that is associated with the Enterprise ACR instance.

Deploy an EAS service with an accelerated image

Deploy an EAS service in a workspace. The following list describes the key parameters. For other parameters, see the EAS topic Custom deployment.

  • Image Configuration: On the tab, enter the accelerated image address. The format is the standard image URL with the _accelerated suffix.

  • VPC: Select the VPC that is associated with the Enterprise ACR instance.

Related information

For more information about DLC, DSW, and EAS, see the following topics: