All Products
Search
Document Center

Elastic Container Instance:Create an instance by specifying a computing category

Last Updated:Apr 01, 2026

When you create an Elastic Container Instance (ECI) by specifying vCPU and memory, you can also specify a compute category to control cost and performance. ECI supports two compute categories: economy (lower vCPU unit price, suited for cost-sensitive workloads) and general (higher performance at the same spec as default instances). This feature does not apply when you specify ECS instance types directly.

The temporary storage space for both economy and general compute category instances defaults to 30 GiB.

Choose a compute category

EconomyGeneral
vCPU range0.25–81–64
vCPU unit priceLower than generalSame as default (no category)
Memory unit priceSame as generalSame as default (no category)
PerformanceStandardHigher than same-spec default instances
Best forBatch jobs, dev/test, simple web servicesProduction APIs, latency-sensitive services, stable-performance workloads

Guidelines:

  • Cost-sensitive workloads (batch processing, dev/test, simple web services): Use economy. Economy instances have a lower vCPU unit price, so savings grow with scale. Performance fluctuation is acceptable in these scenarios.

  • Production services that require stable, consistent performance (APIs, microservices, latency-sensitive applications): Use general. General instances deliver higher performance than same-spec instances created without a compute category.

  • High-availability scenarios: Specify multiple compute categories. ECI tries each category in the order you specify, which reduces instance creation failures caused by resource exhaustion.

Important

The economy and general compute categories are in public preview.

Limitations

  • Requires vCPU and memory spec mode. This feature only applies when you create instances by specifying vCPU and memory. If you specify ECS instance types instead, those take precedence and the ComputeCategory parameter is ignored.

  • Not supported for preemptible instances. Setting both a preemptible instance category and a compute category returns a FeatureBasedConstraintConflict error.

  • Not supported for Arm-based instances. Setting both an Arm CPU architecture and a compute category returns a FeatureBasedConstraintConflict error.

Billing

Important

After the instance is created, call DescribeContainerGroups to confirm the instance's actual compute category (the ComputeCategory response field). You are charged based on the unit prices of the assigned category.

Economy compute category

Compared to instances created without a compute category, economy instances have a lower vCPU unit price and the same memory unit price.

ResourcePer secondPer hour
vCPUUSD 0.00000424/vCPUUSD 0.015264/vCPU
MemoryUSD 0.00000096/GiBUSD 0.003456/GiB

General compute category

ResourcePer secondPer hour
vCPUUSD 0.0000077/vCPUUSD 0.02772/vCPU
MemoryUSD 0.00000096/GiBUSD 0.003456/GiB

Supported specifications

Economy compute category

Available in all regions

vCPUMemory (GiB)Baseline bandwidth (bidirectional, Gbit/s)
0.250.5 and 10.08
0.51 and 20.08
12, 4, and 80.08
21, 2, 4, 8, and 160.2
42, 4, 8, 16, and 320.4
84, 8, 16, 32, and 640.8

Available in select regions only

Important

The following specifications are only available in these regions: China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), and Singapore. When you create an elastic container instance that has one of the following specifications, make sure that the corresponding specifications are supported in the specified region and zone. Otherwise, the instance cannot be created because no resources exist in the region and zone. These specifications cannot be used to create preemptible instances.

vCPUMemory (GiB)Baseline bandwidth (bidirectional, Gbit/s)
26, 10, 12, and 140.2
46, 10, 12, 14, 18, 20, 22, 24, 26, 28, and 300.4
66–48 in 2 GiB increments0.8
810, 12, 14, 18, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, and 620.8

General compute category

Available in all regions

vCPUMemory (GiB)Baseline bandwidth (bidirectional, Gbit/s)
12, 4, and 81
21, 2, 4, 8, and 161
42, 4, 8, 16, and 321.5
84, 8, 16, 32, and 642
1212, 24, 48, and 962.5
1616, 32, 64, and 1283
2424, 48, 96, and 1924.5
3232, 64, 128, and 2566
5296, 192, and 38412.5
64128, 256, and 51220

Available in select regions only

Important

The following specifications are only available in these regions: China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), and Singapore. When you create an elastic container instance that has one of the following specifications, make sure that the corresponding specifications are supported in the specified region and zone. Otherwise, the instance cannot be created because no resources exist in the region and zone. These specifications cannot be used to create preemptible instances.

vCPUMemory (GiB)Baseline bandwidth (bidirectional, Gbit/s)
26, 10, 12, and 141
46, 10, 12, 14, 18, 20, 22, 24, 26, 28, and 301.5
66–48 in 2 GiB increments1.5
810, 12, 14, 18, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, and 622.5

Configure the compute category

Use the ComputeCategory parameter in the CreateContainerGroup API operation. Specify vCPU and memory using one of the following methods:

MethodHow it works
Container-level specs onlySet Container.N.Cpu and Container.N.Memory for each container. ECI sums the values across all containers to determine the instance spec.
Instance-level + container-level specsSet Cpu and Memory at the instance level. Optionally also set per-container specs.
InstanceType with vCPU/memory notationSet InstanceType to a value like 2-4Gi. Supports up to five comma-separated specs.

Parameters

ParameterTypeExampleDescription
Cpunumber2.0Number of vCPUs to allocate to the instance
Memorynumber4.0Memory size of the instance, in GiB
Container.N.Cpunumber0.5Number of vCPUs to allocate to container N
Container.N.Memorynumber1.0Memory size of container N, in GiB
InstanceTypestring2-4GivCPU and memory specs in {vCPU}-{memory}Gi format. Supports up to five comma-separated values. You can also specify ECS instance types, but ComputeCategory is only applied when this parameter uses vCPU/memory notation.
ComputeCategorystring[]economyCompute category. Valid values: economy, general. Specify multiple values to set a fallback order.

How instances are scheduled

After you set ComputeCategory, ECI determines the actual instance spec and category based on the following rules:

ConfigurationResult
ComputeCategory is set but no vCPU/memory is specifiedCreates an instance with 2 vCPUs and 4 GiB of memory using the specified category.
vCPU/memory and ComputeCategory are set and compatibleCreates the instance as specified.
vCPU count < 1, but category is generalECI automatically adjusts the vCPU count to 1 to meet the general category's minimum requirement.
vCPU count > 8, but category is economyThe combination is invalid. ECI cannot auto-adjust and returns an error.
vCPU/memory is within the category's range but doesn't match a supported spec exactlyECI rounds up to the nearest supported spec. For example, 7-13Gi with general becomes 8 vCPUs and 16 GiB.
Multiple vCPU/memory specs or multiple categories are specifiedECI tries combinations in the specified order, with instance specs taking priority over categories. See the priority rules below.

Priority rules for multiple specs or categories

When multiple InstanceType values and multiple ComputeCategory values are set, ECI iterates through all spec+category combinations, with specs as the outer loop and categories as the inner loop. For example, InstanceType=4-8Gi,8-16Gi,16-32Gi and ComputeCategory=general,economy produces this attempt sequence:

  1. 4-8Gi, general

  2. 4-8Gi, economy

  3. 8-16Gi, general

  4. 8-16Gi, economy

  5. 16-32Gi, general

  6. 16-32Gi, economy (invalid — automatically skipped because 16 vCPUs exceeds the economy category's 8-vCPU maximum)

Important

If a spec doesn't match any supported value, ECI rounds up to the nearest supported spec before trying each category. If the rounded-up spec is incompatible with a given category, that category is skipped for that spec. For example, InstanceType=0.5-1.9Gi with ComputeCategory=general,economy rounds up to 0.5-2Gi. Because 0.5 vCPU is incompatible with the general category, ECI schedules 0.5-2Gi with economy only.

Examples

Example 1: Set container-level specs and use the economy category

ContainerGroupName=test-category
# Set the compute category to economy.
ComputeCategory.1=economy
# Specify the vCPU and memory specs of each container.
Container.1.Cpu=1.0
Container.1.Memory=2.0
Container.1.Name=nginx
Container.1.Image=registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.14.2

Example 2: Set instance-level specs and specify both categories as a fallback

ContainerGroupName=test-category
# Set the vCPU and memory specs at the instance level.
Cpu=4.0
Memory=8.0
# Try general first, then fall back to economy if resources are unavailable.
ComputeCategory.1=general
ComputeCategory.2=economy
# Configure the containers.
Container.1.Name=nginx
Container.1.Image=registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.14.2

Example 3: Specify multiple instance specs with the general category

ContainerGroupName=test-category
# Specify multiple instance specs — ECI uses the first one with available resources.
 InstanceType=2-4Gi,4-8Gi
# Set the compute category to general.
ComputeCategory.1=general
# Configure the containers.
Container.1.Name=nginx
Container.1.Image=registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.14.2