Run builds and checks in a per-node build slice with CPU, IO and memory limits (issue 1798)

This commit is contained in:
2026-10-22 00:24:45 +02:00
parent a929df9b0e
commit af2c6b5e94
7 changed files with 139 additions and 3 deletions
@@ -6,3 +6,4 @@ MESH_NPM_TOKEN_FILE=/run/mesh/package-registry.secret
MESH_GENESIS_PACKAGE_REGISTRY=/run/mesh/genesis-package-registry.json
MESH_WORKSPACE=${dir:workspace}
MESH_JUDGE_CACHE=${dir:judge-cache}
MESH_BUILD_CGROUP_PARENT=mesh-build.slice
@@ -0,0 +1,10 @@
# Managed by the mesh (module build-agent). Replaced on every push; edit the module's settings instead.
#
# Everything a build or check starts on this machine runs in this slice (novox/hq issue 1798): the build
# agent starts every container with --cgroup-parent=mesh-build.slice. The weights only bind while the machine
# is busy, so an idle machine still builds at full speed; the memory limits are the part that always binds.
[Slice]
CPUWeight=${config:cpu-weight}
IOWeight=${config:io-weight}
MemoryHigh=${config:memory-high}
MemoryMax=${config:memory-max}