Skip to content

Commit deac6b8

Browse files
classabbyampDuncaen
authored andcommitted
services/nomad/build/buildbot-worker: use cpu instead of cores for scheduling
this also decouples the makejobs from the amount of cpu used to schedule with nomad
1 parent 3ac1f81 commit deac6b8

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

services/nomad/build/buildbot-worker.nomad

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ job "buildbot-worker" {
55

66
dynamic "group" {
77
for_each = [
8+
// cpu is ~equivalent to a number of cores
89
// memory is ~90% of capacity
910
// memory_max is ~95% of capacity
10-
{ name = "glibc", jobs = 10, mem = 115840, mem_max = 122270 },
11-
{ name = "musl", jobs = 6, mem = 57690, mem_max = 60890 },
12-
{ name = "aarch64", jobs = 3, mem = 28500, mem_max = 30500 },
11+
{ name = "glibc", jobs = 10, cpu = 38100, mem = 115840, mem_max = 122270 },
12+
{ name = "musl", jobs = 6, cpu = 21700, mem = 57690, mem_max = 60890 },
13+
{ name = "aarch64", jobs = 6, cpu = 12000, mem = 28500, mem_max = 30500 },
1314
]
1415
labels = [ "buildbot-worker-${group.value.name}" ]
1516

@@ -97,7 +98,7 @@ job "buildbot-worker" {
9798
}
9899

99100
resources {
100-
cores = "${group.value.jobs}"
101+
cpu = "${group.value.cpu}"
101102
memory = "${group.value.mem}"
102103
memory_max = "${group.value.mem_max}"
103104
}

0 commit comments

Comments
 (0)