Skip to content

client: set totalcompute from usable cores - #18

Merged
schmichael merged 1 commit into
vercel/main-2.0.5from
schmichael/autototalcompute
Oct 16, 2026
Merged

schmichael merged 1 commit into
vercel/main-2.0.5from
schmichael/autototalcompute

Conversation

@schmichael

@schmichael schmichael commented Oct 16, 2026 •

Copy link
Copy Markdown

Alternative to #17


Linux arm64 w/ 18 cores, 9 reservable

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.frequency                            = 2000
cpu.numcores                             = 18
cpu.reservablecores                      = 9
cpu.totalcompute                         = 18000
cpu.usablecompute                        = 18000

cpu=1000 job:

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

cores=2 job added:

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

Saturate with cores=1 jobs:

Allocated Resources
CPU              Memory          Disk            Alloc Count
18000/18000 MHz  900 MiB/16 GiB  2.6 GiB/12 GiB  9

So with 1 cores=8 job the utilization looks right:

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

And then trying to schedule a cpu=4000 job the rejection looks right:

2026-10-16T12:31:10-07:00: Task Group "examplecpu" (failed to place 1 allocation):
 * Resources exhausted on 1 nodes
 * Dimension "cpu" exhausted on 1 nodes

Reversing the submission order works as expected.

cpu=4000 job results in:

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

cores=8 job results in:

    2026-10-16T12:33:37-07:00: Task Group "batchcore" (failed to place 1 allocation):
      * Resources exhausted on 1 nodes
      * Dimension "cpu" exhausted on 1 nodes

With cpu_total_compute=20000

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

Allocation Resource Utilization
CPU          Memory
0/20000 MHz  0 B/16 GiB

Host Resource Utilization
CPU           Memory          Disk
34/20000 MHz  804 MiB/16 GiB  (tmpfs)

Allocations
No allocations placed

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

After a cores=8 job:

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

After a cpu=4000 job is added:

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

With cpu_total_compute=50000

Trying to run multiple jobs with cores=8:

...
      * Resources exhausted on 1 nodes
      * Dimension "cores" exhausted on 1 nodes

$ nomad node status -self
...
Allocated Resources
CPU              Memory          Disk            Alloc Count
16000/50000 MHz  256 MiB/16 GiB  300 MiB/12 GiB  1
...

But cpu=4000 jobs still fit:

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

@schmichael
schmichael merged commit 7a185bb into vercel/main-2.0.5 Oct 16, 2026
10 of 12 checks passed
@schmichael
schmichael deleted the schmichael/autototalcompute branch October 16, 2026 19:35
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.

2 participants