All Products
Search
Document Center

Elastic Container Instance:Image caches

Last Updated:Nov 07, 2022

This topic describes the billing rules for image caches and provides billing examples.

Description

Image caches can be used to accelerate image pulls and reduce the startup time of elastic container instances. Image caches are classified into manual image caches and automatic image caches. The following table describes the billing rules of the types of image caches.

Operation phase

Manual image caches

Automatic image caches

Create an image cache

The resources can be viewed. The following part describes the billable items:

  • Temporary resources (the elastic container instance and the disk that are used to create the image cache)

  • The snapshot

The resources cannot be viewed. You are not charged for the resources.

Use the image cache

Billable item: the disk.

If the image cache is greater than 30 GiB in size, you must increase the capacity of the temporary storage space and pay for the additional capacity.

Note

After the image cache is created, you can view the size of the image cache in the creation event information of the image cache. For more information, see Overview of image caches.

Manual image caches

  • Create an image cache

    Billable item

    Description

    References

    Temporary resources (the elastic container instance and the disk that are used to create the image cache)

    When you manually create an image cache, the system automatically creates a temporary performance level-1 (PL1) enhanced SSD (ESSD), and a temporary elastic container instance that provides 2 vCPUs and 4 GiB memory. The temporary instance and ESSD are used to create the image cache. After the image cache is created, the instance and the ESSD are automatically released. You are no longer charged for the resources.

    • Billing method: pay-as-you-go.

    • Billing formula: Price = (Unit price of vCPUs × 2 + Unit price of memory × 4 + Unit price of disks × Storage capacity of the disk) × The run duration of the instance.

    • Description of the formula:

      • Unit price

        • vCPUs: USD 0.0000077/second/vCPU.

        • Memory (GiB): USD 0.00000096/second.

        • Disks: see the Storage tab under the Pricing tab of the Elastic Compute Service buy page.

      • The storage capacity of the disk: This value is equal to the size of the image cache.

      • The run duration of the instance: The run duration of the instance varies based on the size of the image cache. To create the image cache, the temporary elastic container instance needs to pull an image. The temporary instance requires a longer period of time to pull a larger size of image. As a result, the run duration of the temporary instance is longer if you create a larger size of image cache.

    The snapshot

    When you create an image cache, the system pulls an image to create a temporary elastic container instance, and then creates a regular snapshot based on the temporary instance. The lifecycle of the snapshot is the same as the lifecycle of the image cache. You must pay the snapshot storage fee to retain the image cache.

    Note

    If the instant image cache feature is enabled, you must pay the service fee to quickly access the snapshot.

    Snapshots

  • Use the image cache

    Billable item

    Description

    References

    The disk

    If you use a manual image cache to create an elastic container instance, the system automatically attaches a pay-as-you-go PL1 ESSD to the instance. If no PL1 ESSD is available, an ultra disk is attached. The storage capacity of the disk is equal to the size of the image cache. The disk is created and released together with the instance. You must pay for the elastic container instance and the disk.

    For information about the billing rules of the disk, see EBS devices.

    EBS devices

Automatic image caches

You can enable automatic matching for image caches when you create an elastic container instance. If no image cache is matched, the system pulls an image to create the instance and creates an image cache based on the instance.

When you use an automatic image cache to create an elastic container instance, you may need to pay for the additional capacity of the temporary storage space based on the size of the image cache.

Billable item

Description

Additional capacity of the temporary storage space

If the image cache that you used to create the elastic container instance is greater than 30 GiB in size, you must increase the capacity of the temporary storage space of the elastic container instance. You must pay for the elastic container instance and the additional capacity of the temporary storage space.

Temporary storage space

Billing examples

Note

The following examples are provided only for reference. The actual prices in your bills take precedence.

Example 1: Create and use a manual image cache

For example, you create an image cache in the China (Hangzhou) region that is 40 GiB in size and retain the cache for 3 days. When you create the image cache, you do not enable the instant image cache feature, and the temporary elastic container instance runs for a duration of 5 minutes (300 seconds). The storage capacity of the snapshot that corresponds to the image cache is 2 GiB. You are charged for the following resources when you create the image cache:

  • The temporary resources: (0.0000077 × 2 + 0.00000096 × 4 + 0.05/100/3600 × 40) × 300 = USD 0.007449.

  • The snapshot: 0.02/30 × 2 × 3 = USD 0.004.

If you use the image cache to create an elastic container instance and the instance runs for 3 hours, you are charged for the instance and disk. The disk price is equal to the usage fees of the image cache. Price = 0.05/100 × 40 × 3 = USD 0.06

Example 2: Use an automatic image cache

For example, you create Elastic Container Instance A in the China (Hangzhou) region. The image that you use to create the instance is not greater than 30 GiB in size. When you create the instance, you enable automatic matching for image caches. If no image cache is matched, the system automatically creates an image cache. You do not need to pay for the automatic creation of the image cache.

If you create Elastic Container Instance B based on the image cache, you need to pay only the instance price.