Skip to content

Support launching with hyperthreading disabled (--cpu-options ThreadsPerCore=1) #73

Open

Description

@scttfrdmn

Description

spawn currently has no option to disable hyperthreading when launching instances. For HPC workloads, per-core-licensed software, and memory-bound workloads, launching with ThreadsPerCore=1 can significantly improve performance by eliminating contention between hyperthreads sharing the same physical core.

Proposed feature

Add a flag to spawn launch that sets AWS CPU options:

# Disable hyperthreading — each vCPU = 1 physical core
spawn launch --instance-type c7i.8xlarge --no-hyperthreading

# Or more granular control
spawn launch --instance-type c7i.8xlarge --threads-per-core 1

This maps to the AWS EC2 RunInstances API parameter:

{
  "CpuOptions": {
    "ThreadsPerCore": 1
  }
}

Use cases

  1. HPC workloads — memory-bound computation (CFD, FEA) where two hyperthreads sharing an L1/L2 cache hurts more than it helps
  2. Per-core licensing — Oracle, MATLAB, etc. charge per physical core; disabling HT means you pay for fewer cores
  3. Consistent performance — eliminating HT removes jitter from co-located threads competing for execution units
  4. MPI jobs — --mpi-processes-per-node currently defaults to vCPU count, but with HT disabled it would equal physical core count (the right number for memory-bound codes)

Context

Related truffle issue: spore-host/truffle#43 (truffle doesn't distinguish cores vs vCPUs)

The full pipeline should be:

# Find 8 physical cores for HPC
truffle find "intel 8 physical cores" --exact | spawn --no-hyperthreading

Additional considerations

  • Not all instance types support disabling HT (e.g., T2 burstable, some older gens)
  • spawn could warn if the user requests --no-hyperthreading on an unsupported instance type
  • Consider adding --show-cores to truffle output so users can see physical core count alongside vCPUs

Activity

  1. added
    area:launch
    on Jun 12, 2026
  2. added this to the Later milestone on Oct 19, 2026
  3. modified the milestones: Later, Post-1.0 on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:launch

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions