When you call the RunInstances operation to create an ECS instance, you can customize its CPU options to match your workload requirements. CPU options consist of two parameters:
Number of physical CPU cores: Reduce the core count to achieve better performance and control costs.
Number of threads per core: Set to
1to disable Hyper-Threading (HT), which runs two threads concurrently on each physical CPU core. Disabling HT is common for high performance computing (HPC) workloads.
The number of vCPUs equals the number of physical CPU cores multiplied by the number of threads per core. For example, ecs.hfg8i.4xlarge has 8 physical CPU cores and 2 threads per core, giving 16 vCPUs by default. To run it with 8 vCPUs and no Hyper-Threading, set cores to 8 and threads per core to 1.
This topic lists the valid CPU option values for instance types in the hfg8i, hfc8i, and hfr8i instance families.
hfg8i instance types
| Instance type | Default vCPUs | Valid values for physical CPU cores | Default threads per core | Valid values for threads per core |
|---|---|---|---|---|
| ecs.hfg8i.large | 2 | 1 | 2 | 1, 2 |
| ecs.hfg8i.xlarge | 4 | 2 | 2 | 1, 2 |
| ecs.hfg8i.2xlarge | 8 | 4 | 2 | 1, 2 |
| ecs.hfg8i.3xlarge | 12 | 6 | 2 | 1, 2 |
| ecs.hfg8i.4xlarge | 16 | 8 | 2 | 1, 2 |
| ecs.hfg8i.6xlarge | 24 | 12 | 2 | 1, 2 |
| ecs.hfg8i.8xlarge | 32 | 16 | 2 | 1, 2 |
| ecs.hfg8i.16xlarge | 64 | 32 | 2 | 1, 2 |
| ecs.hfg8i.32xlarge | 128 | 64 | 2 | 1, 2 |
hfc8i instance types
| Instance type | Default vCPUs | Valid values for physical CPU cores | Default threads per core | Valid values for threads per core |
|---|---|---|---|---|
| ecs.hfc8i.large | 2 | 1 | 2 | 1, 2 |
| ecs.hfc8i.xlarge | 4 | 2 | 2 | 1, 2 |
| ecs.hfc8i.2xlarge | 8 | 4 | 2 | 1, 2 |
| ecs.hfc8i.3xlarge | 12 | 6 | 2 | 1, 2 |
| ecs.hfc8i.4xlarge | 16 | 8 | 2 | 1, 2 |
| ecs.hfc8i.6xlarge | 24 | 12 | 2 | 1, 2 |
| ecs.hfc8i.8xlarge | 32 | 16 | 2 | 1, 2 |
| ecs.hfc8i.16xlarge | 64 | 32 | 2 | 1, 2 |
| ecs.hfc8i.32xlarge | 128 | 64 | 2 | 1, 2 |
hfr8i instance types
| Instance type | Default vCPUs | Valid values for physical CPU cores | Default threads per core | Valid values for threads per core |
|---|---|---|---|---|
| ecs.hfr8i.large | 2 | 1 | 2 | 1, 2 |
| ecs.hfr8i.xlarge | 4 | 2 | 2 | 1, 2 |
| ecs.hfr8i.2xlarge | 8 | 4 | 2 | 1, 2 |
| ecs.hfr8i.3xlarge | 12 | 6 | 2 | 1, 2 |
| ecs.hfr8i.4xlarge | 16 | 8 | 2 | 1, 2 |
| ecs.hfr8i.6xlarge | 24 | 12 | 2 | 1, 2 |
| ecs.hfr8i.8xlarge | 32 | 16 | 2 | 1, 2 |
| ecs.hfr8i.16xlarge | 64 | 32 | 2 | 1, 2 |
| ecs.hfr8i.32xlarge | 128 | 64 | 2 | 1, 2 |
What's next
After identifying the valid values for your instance type, pass them to the RunInstances operation. For details, see Specify CPU options.
To disable Hyper-Threading, set threads per core to
1. For details, see Number of threads per core.