Skip to content

client: set disabled core speed to 0 - #17

Closed
schmichael wants to merge 1 commit into
vercel/main-2.0.5from
schmichael/hacksonhacks
Closed

schmichael wants to merge 1 commit into
vercel/main-2.0.5from
schmichael/hacksonhacks

Conversation

@schmichael

@schmichael schmichael commented Oct 16, 2026 •

Copy link
Copy Markdown

Workaround TotalCompute including compute from disabled cores by setting their speed to 0. This makes TotalCompute == UsableCompute with TotalCompute surprisingly being the number used by the scheduler.


Linux arm64 w/ 18 cores, 9 reservable

Before

Allocated Resources
CPU          Memory      Disk        Alloc Count
0/36000 MHz  0 B/16 GiB  0 B/12 GiB  0

    ^-- note how the denominator is **totalcompute** not usablecompute

Attributes
cpu.arch                                 = arm64
cpu.frequency                            = 2000
cpu.numcores                             = 18
cpu.reservablecores                      = 9
cpu.totalcompute                         = 36000
cpu.usablecompute                        = 18000

After

Allocated Resources
CPU          Memory      Disk        Alloc Count
0/18000 MHz  0 B/16 GiB  0 B/12 GiB  0

    ^-- total & usable compute match! --v

Attributes
cpu.arch                                 = arm64
cpu.numcores                             = 18
cpu.reservablecores                      = 9
cpu.totalcompute                         = 18000
cpu.usablecompute                        = 18000

After running 1 job with cpu=1000:

Allocated Resources
CPU             Memory          Disk            Alloc Count
1000/18000 MHz  256 MiB/16 GiB  300 MiB/12 GiB  1

   ^-- nothing new here

After adding another job with cores=2:

Allocated Resources
CPU             Memory          Disk            Alloc Count
5000/18000 MHz  512 MiB/16 GiB  600 MiB/12 GiB  2

  ^-- (2cores * 2000) + 1000cpu from previous job = 5000

Running as many jobs with cores=1 as possible:

nomad job run example-1core.nomad.hcl
...
    2026-10-16T12:08:07-07:00: Task Group "batchcore" (failed to place 991 allocations):
      * Resources exhausted on 1 nodes
      * Dimension "cores" exhausted on 1 nodes
    2026-10-16T12:08:07-07:00: Evaluation "a739ea00" waiting for additional capacity to place remainder

nomad node status -self -verbose
...
Allocated Resources
CPU              Memory          Disk            Alloc Count
18000/18000 MHz  900 MiB/16 GiB  2.6 GiB/12 GiB  9

   ^-- cpu and cores/allocs maxed as expected  --^

Workaround TotalCompute including compute from disabled cores by setting
their speed to 0. This makes TotalCompute == UsableCompute with
TotalCompute surprisingly being the number used by the scheduler.
@schmichael

Copy link
Copy Markdown
Author

Let's do #18

@schmichael schmichael closed this Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant