vx 的 DTE 工作器按工作需求配置,頁尾顯示各工作器的負載
DTE workers that fit the work, and a footer that says how full they ran
vx 的 DTE 按工作所需的平台和資源配置工作器,並在頁尾列出每個工作器每次執行的運行情況。一次執行中,9 個 Linux 工作器的忙碌率為 88%。執行 160 項任務時,最佳配置為 8 個 hosted.small、1 個 hosted.arm 和 2 個 hosted.mac,總用時 160.9 秒。
On vx's own main branch, nine Linux workers ran 88% busy for one run.
The footer prints that for every worker, every run.
vx CI on GitHub runners, 160 tasks to run · 4a86e02 · 2026-11-07 · the run
A Mac starts only for a Mac task
dte({
workers: {
hosted: {
machines: {
small: { max: 9, cpu: 4, memory: '16GB', platform: 'linux-x64' },
arm: { max: 1, cpu: 4, memory: '16GB', platform: 'linux-arm64' },
mac: { max: 4, cpu: 3, memory: '7GB', platform: 'darwin-arm64' },
},
},
},
})
A task runs on a machine of its own platform, Linux unless it names
another. A Mac starts only when a task needs macOS, and only as many as
those tasks fill. exec.worker sends a task to one named type.
A task is booked by what it used last time
Memory is booked at its peak, since running out kills a task. CPU is
booked at its average, so a worker is not left half idle.
A server stops once no task needs it
A dev server or database a test depends on starts on that test's
worker. It stops when no task left in the run uses it, and its CPU is
charged to the tasks it served.
The footer shows three numbers per worker
hosted.small#1 left 12 done · warm-up 91.9s
declared 4c/16G · actual 4c/17G
online 122.2s · busy 122.1s · idle 0.1s
cpu utilization machine 94% · tasks 67% · worker 3%
best 8 × hosted.small + 1 × hosted.arm + 2 × hosted.mac: 160.9s
total cpu utilization machine 88% · tasks 63% · worker 2%
machine counts any process on the box, tasks only your tasks, and
worker vx itself. The best line says which workers would have run
this run soonest, with the fewest machines.
How DTE places work: vx-dte.
More at vznjs.github.io/vx.
Originally published on the vx blog. vx is open-source (MIT) task orchestration with a build cache: vznjs.github.io/vx · GitHub.
Written with AI assistance.
來源:DEV Community · dev.to