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
| Economy | General | |
|---|---|---|
| vCPU range | 0.25–8 | 1–64 |
| vCPU unit price | Lower than general | Same as default (no category) |
| Memory unit price | Same as general | Same as default (no category) |
| Performance | Standard | Higher than same-spec default instances |
| Best for | Batch jobs, dev/test, simple web services | Production 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.
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
ComputeCategoryparameter is ignored.Not supported for preemptible instances. Setting both a preemptible instance category and a compute category returns a
FeatureBasedConstraintConflicterror.Not supported for Arm-based instances. Setting both an Arm CPU architecture and a compute category returns a
FeatureBasedConstraintConflicterror.
Billing
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.
| Resource | Per second | Per hour |
|---|---|---|
| vCPU | USD 0.00000424/vCPU | USD 0.015264/vCPU |
| Memory | USD 0.00000096/GiB | USD 0.003456/GiB |
General compute category
| Resource | Per second | Per hour |
|---|---|---|
| vCPU | USD 0.0000077/vCPU | USD 0.02772/vCPU |
| Memory | USD 0.00000096/GiB | USD 0.003456/GiB |
Supported specifications
Economy compute category
Available in all regions
| vCPU | Memory (GiB) | Baseline bandwidth (bidirectional, Gbit/s) |
|---|---|---|
| 0.25 | 0.5 and 1 | 0.08 |
| 0.5 | 1 and 2 | 0.08 |
| 1 | 2, 4, and 8 | 0.08 |
| 2 | 1, 2, 4, 8, and 16 | 0.2 |
| 4 | 2, 4, 8, 16, and 32 | 0.4 |
| 8 | 4, 8, 16, 32, and 64 | 0.8 |
Available in select regions only
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.
| vCPU | Memory (GiB) | Baseline bandwidth (bidirectional, Gbit/s) |
|---|---|---|
| 2 | 6, 10, 12, and 14 | 0.2 |
| 4 | 6, 10, 12, 14, 18, 20, 22, 24, 26, 28, and 30 | 0.4 |
| 6 | 6–48 in 2 GiB increments | 0.8 |
| 8 | 10, 12, 14, 18, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, and 62 | 0.8 |
General compute category
Available in all regions
| vCPU | Memory (GiB) | Baseline bandwidth (bidirectional, Gbit/s) |
|---|---|---|
| 1 | 2, 4, and 8 | 1 |
| 2 | 1, 2, 4, 8, and 16 | 1 |
| 4 | 2, 4, 8, 16, and 32 | 1.5 |
| 8 | 4, 8, 16, 32, and 64 | 2 |
| 12 | 12, 24, 48, and 96 | 2.5 |
| 16 | 16, 32, 64, and 128 | 3 |
| 24 | 24, 48, 96, and 192 | 4.5 |
| 32 | 32, 64, 128, and 256 | 6 |
| 52 | 96, 192, and 384 | 12.5 |
| 64 | 128, 256, and 512 | 20 |
Available in select regions only
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.
| vCPU | Memory (GiB) | Baseline bandwidth (bidirectional, Gbit/s) |
|---|---|---|
| 2 | 6, 10, 12, and 14 | 1 |
| 4 | 6, 10, 12, 14, 18, 20, 22, 24, 26, 28, and 30 | 1.5 |
| 6 | 6–48 in 2 GiB increments | 1.5 |
| 8 | 10, 12, 14, 18, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, and 62 | 2.5 |
Configure the compute category
Use the ComputeCategory parameter in the CreateContainerGroup API operation. Specify vCPU and memory using one of the following methods:
| Method | How it works |
|---|---|
| Container-level specs only | Set 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 specs | Set Cpu and Memory at the instance level. Optionally also set per-container specs. |
InstanceType with vCPU/memory notation | Set InstanceType to a value like 2-4Gi. Supports up to five comma-separated specs. |
Parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
Cpu | number | 2.0 | Number of vCPUs to allocate to the instance |
Memory | number | 4.0 | Memory size of the instance, in GiB |
Container.N.Cpu | number | 0.5 | Number of vCPUs to allocate to container N |
Container.N.Memory | number | 1.0 | Memory size of container N, in GiB |
InstanceType | string | 2-4Gi | vCPU 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. |
ComputeCategory | string[] | economy | Compute 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:
| Configuration | Result |
|---|---|
ComputeCategory is set but no vCPU/memory is specified | Creates an instance with 2 vCPUs and 4 GiB of memory using the specified category. |
vCPU/memory and ComputeCategory are set and compatible | Creates the instance as specified. |
vCPU count < 1, but category is general | ECI automatically adjusts the vCPU count to 1 to meet the general category's minimum requirement. |
vCPU count > 8, but category is economy | The 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 exactly | ECI 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 specified | ECI 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:
4-8Gi, general
4-8Gi, economy
8-16Gi, general
8-16Gi, economy
16-32Gi, general
16-32Gi, economy (invalid — automatically skipped because 16 vCPUs exceeds the economy category's 8-vCPU maximum)
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.2Example 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.2Example 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