When you call the RunInstances operation to create Elastic Compute Service (ECS) instances, you can specify CPU options for specific instance types. The CPU options of an ECS instance include the number of physical CPU cores and the number of threads per core. You can adjust the number of vCPUs allocated to an ECS instance by changing the number of physical CPU cores and the number of threads per core of the ECS instance based on your application performance requirements. This way, you can gain better performance and control costs. This topic lists the values related to the number of physical CPU cores and the number of threads per core of each instance type in general-purpose instance families. You can use these values when you specify CPU options.
Values related to the number of physical CPU cores and the number of threads per core of g8i instance types
Instance type | Default value for the number of vCPUs | Valid values for the number of physical CPU cores | Default value for the number of threads per core | Valid values for the number of threads per core |
ecs.g8i.large | 2 | 1 | 2 | 1 and 2 |
ecs.g8i.xlarge | 4 | 2 | 2 | 1 and 2 |
ecs.g8i.2xlarge | 8 | 4 | 2 | 1 and 2 |
ecs.g8i.3xlarge | 12 | 6 | 2 | 1 and 2 |
ecs.g8i.4xlarge | 16 | 8 | 2 | 1 and 2 |
ecs.g8i.6xlarge | 24 | 12 | 2 | 1 and 2 |
ecs.g8i.8xlarge | 32 | 16 | 2 | 1 and 2 |
ecs.g8i.12xlarge | 48 | 24 | 2 | 1 and 2 |
ecs.g8i.16xlarge | 64 | 32 | 2 | 1 and 2 |
ecs.g8i.24xlarge | 96 | 48 | 2 | 1 and 2 |
ecs.g8i.48xlarge | 192 | 96 | 2 | 1 and 2 |
Values related to the number of physical CPU cores and the number of threads per core of g7a instance types
Instance type | Default value for the number of vCPUs | Valid values for the number of physical CPU cores | Default value for the number of threads per core | Valid values for the number of threads per core |
ecs.g7a.large | 2 | 1 | 2 | 1 and 2 |
ecs.g7a.xlarge | 4 | 2 | 2 | 1 and 2 |
ecs.g7a.2xlarge | 8 | 4 | 2 | 1 and 2 |
ecs.g7a.4xlarge | 16 | 8 | 2 | 1 and 2 |
ecs.g7a.8xlarge | 32 | 16 | 2 | 1 and 2 |
ecs.g7a.16xlarge | 64 | 32 | 2 | 1 and 2 |
ecs.g7a.32xlarge | 128 | 64 | 2 | 1 and 2 |
Values related to the number of physical CPU cores and the number of threads per core of g7 instance types
Instance type | Default value for the number of vCPUs | Valid values for the number of physical CPU cores | Default value for the number of threads per core | Valid values for the number of threads per core |
ecs.g7.large | 2 | 1 | 2 | 1 and 2 |
ecs.g7.xlarge | 4 | 2 | 2 | 1 and 2 |
ecs.g7.2xlarge | 8 | 2 and 4 | 2 | 1 and 2 |
ecs.g7.3xlarge | 12 | 2, 4, and 6 | 2 | 1 and 2 |
ecs.g7.4xlarge | 16 | 2, 4, 6, and 8 | 2 | 1 and 2 |
ecs.g7.6xlarge | 24 | 2, 4, 6, 8, 10, and 12 | 2 | 1 and 2 |
ecs.g7.8xlarge | 32 | 2, 4, 6, 8, 10, 12, 14, and 16 | 2 | 1 and 2 |
ecs.g7.16xlarge | 64 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, and 32 | 2 | 1 and 2 |
ecs.g7.32xlarge | 128 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, and 64 | 2 | 1 and 2 |
Values related to the number of physical CPU cores and the number of threads per core of g7t instance types
Instance type | Default value for the number of vCPUs | Valid values for the number of physical CPU cores | Default value for the number of threads per core | Valid values for the number of threads per core |
ecs.g7t.large | 2 | 1 | 2 | 1 and 2 |
ecs.g7t.xlarge | 4 | 2 | 2 | 1 and 2 |
ecs.g7t.2xlarge | 8 | 2 and 4 | 2 | 1 and 2 |
ecs.g7t.3xlarge | 12 | 2, 4, and 6 | 2 | 1 and 2 |
ecs.g7t.4xlarge | 16 | 2, 4, 6, and 8 | 2 | 1 and 2 |
ecs.g7t.6xlarge | 24 | 2, 4, 6, 8, 10, and 12 | 2 | 1 and 2 |
ecs.g7t.8xlarge | 32 | 2, 4, 6, 8, 10, 12, 14, and 16 | 2 | 1 and 2 |
ecs.g7t.16xlarge | 64 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, and 32 | 2 | 1 and 2 |
ecs.g7t.32xlarge | 128 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, and 64 | 2 | 1 and 2 |
Values related to the number of physical CPU cores and the number of threads per core of g7ne instance types
Instance type | Default value for the number of vCPUs | Valid values for the number of physical CPU cores | Default value for the number of threads per core | Valid values for the number of threads per core |
ecs.g7ne.large | 2 | 1 | 2 | 1 and 2 |
ecs.g7ne.xlarge | 4 | 2 | 2 | 1 and 2 |
ecs.g7ne.2xlarge | 8 | 2 and 4 | 2 | 1 and 2 |
ecs.g7ne.4xlarge | 16 | 2, 4, 6, and 8 | 2 | 1 and 2 |
ecs.g7ne.8xlarge | 32 | 2, 4, 6, 8, 10, 12, 14, and 16 | 2 | 1 and 2 |
ecs.g7ne.12xlarge | 48 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, and 24 | 2 | 1 and 2 |
ecs.g7ne.16xlarge | 64 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, and 32 | 2 | 1 and 2 |
ecs.g7ne.24xlarge | 96 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, and 48 | 2 | 1 and 2 |
Values related to the number of physical CPU cores and the number of threads per core of g6t instance types
Instance type | Default value for the number of vCPUs | Valid values for the number of physical CPU cores | Default value for the number of threads per core | Valid values for the number of threads per core |
ecs.g6t.large | 2 | 1 | 2 | 1 and 2 |
ecs.g6t.xlarge | 4 | 2 | 2 | 1 and 2 |
ecs.g6t.2xlarge | 8 | 2 and 4 | 2 | 1 and 2 |
ecs.g6t.4xlarge | 16 | 2, 4, 6, and 8 | 2 | 1 and 2 |
ecs.g6t.8xlarge | 32 | 2, 4, 6, 8, 10, 12, 14, and 16 | 2 | 1 and 2 |
ecs.g6t.13xlarge | 52 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, and 26 | 2 | 1 and 2 |
ecs.g6t.26xlarge | 104 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, and 52 | 2 | 1 and 2 |
Values related to the number of physical CPU cores and the number of threads per core of g6a instance types
Instance type | Default value for the number of vCPUs | Valid values for the number of physical CPU cores | Default value for the number of threads per core | Valid values for the number of threads per core |
ecs.g6a.large | 2 | 1 | 2 | 1 and 2 |
ecs.g6a.xlarge | 4 | 2 | 2 | 1 and 2 |
ecs.g6a.2xlarge | 8 | 4 | 2 | 1 and 2 |
ecs.g6a.4xlarge | 16 | 8 | 2 | 1 and 2 |
ecs.g6a.8xlarge | 32 | 16 | 2 | 1 and 2 |
ecs.g6a.16xlarge | 64 | 32 | 2 | 1 and 2 |
ecs.g6a.32xlarge | 128 | 64 | 2 | 1 and 2 |
Values related to the number of physical CPU cores and the number of threads per core of g6e instance types
Instance type | Default value for the number of vCPUs | Valid values for the number of physical CPU cores | Default value for the number of threads per core | Valid values for the number of threads per core |
ecs.g6e.large | 2 | 1 | 2 | 1 and 2 |
ecs.g6e.xlarge | 4 | 2 | 2 | 1 and 2 |
ecs.g6e.2xlarge | 8 | 2 and 4 | 2 | 1 and 2 |
ecs.g6e.4xlarge | 16 | 2, 4, 6, and 8 | 2 | 1 and 2 |
ecs.g6e.8xlarge | 32 | 2, 4, 6, 8, 10, 12, 14, and 16 | 2 | 1 and 2 |
ecs.g6e.13xlarge | 52 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, and 26 | 2 | 1 and 2 |
ecs.g6e.26xlarge | 104 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, and 52 | 2 | 1 and 2 |
Values related to the number of physical CPU cores and the number of threads per core of g6 instance types
Instance type | Default value for the number of vCPUs | Valid values for the number of physical CPU cores | Default value for the number of threads per core | Valid values for the number of threads per core |
ecs.g6.large | 2 | 1 | 2 | 1 and 2 |
ecs.g6.xlarge | 4 | 2 | 2 | 1 and 2 |
ecs.g6.2xlarge | 8 | 2 and 4 | 2 | 1 and 2 |
ecs.g6.3xlarge | 12 | 2, 4, and 6 | 2 | 1 and 2 |
ecs.g6.4xlarge | 16 | 2, 4, 6, and 8 | 2 | 1 and 2 |
ecs.g6.6xlarge | 24 | 2, 4, 6, 8, 10, and 12 | 2 | 1 and 2 |
ecs.g6.8xlarge | 32 | 2, 4, 6, 8, 10, 12, 14, and 16 | 2 | 1 and 2 |
ecs.g6.13xlarge | 52 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, and 26 | 2 | 1 and 2 |
ecs.g6.26xlarge | 104 | 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, and 52 | 2 | 1 and 2 |
References
After you obtain the valid values for the number of physical CPU cores and the number of threads per core of an instance type, you can change the CPU options of the instance type based on your business requirements. For more information, see the Specify CPU options section in the "Specify and view CPU options" topic.
Hyper-threading (HT) enables two threads to concurrently run on a single physical CPU core as vCPUs. To create an ECS instance that uses only physical CPU cores, you need to only disable HT for the instance. For more information, see the Number of threads per core section in the "Specify and view CPU options" topic.