Hyper-threading is a CPU technology that allows each physical core to handle two threads (tasks) simultaneously. This increases the total number of tasks your CPU can process at once and improves performance for certain workloads.
A vCPU (virtual CPU) is a thread exposed by a physical CPU core.
With hyper-threading enabled:
Example:

The cloud machines we make available at Inductiva often expose all available vCPUs by default.
Example machine types:
| Machine Type | Physical Cores | Threads per Core | vCPUs |
|---|---|---|---|
c2d-highcpu-4 | 2 | 2 | 4 |
c3d-highcpu-16 | 8 | 2 | 16 |
Formula:
vCPUs = Physical Cores × Threads per Core
You can disable hyper-threading with Inductiva at the moment you create a
Machine Group. This is done by setting the parameter threads_per_core=1 in the
constructor:
cloud_machine = inductiva.resources.MachineGroup(
provider="GCP",
machine_type="c2d-highcpu-4",
threads_per_core=1)
This forces the machine to expose only physical cores:
| Machine Type | Physical Cores | Threads per Core | vCPUs |
|---|---|---|---|
c2d-highcpu-4 | 2 | 1 | 2 |
c3d-highcpu-16 | 8 | 1 | 8 |
Note:
- In the cloud, you are charged based on the total number of vCPUs defined by the machine type, not on how many vCPUs you actually use. This means the cost is the same whether you set
threads_per_core=1orthreads_per_core=2.- You can not change the number of threads per core at run time. This needs to be done when initializing the machine.
threads_per_core=1 does not reduce costs.