Run builds and checks in a per-node build slice with CPU, IO and memory limits (issue 1798)
This commit is contained in:
@@ -2,6 +2,34 @@
|
||||
"module": "build-agent",
|
||||
"version": "1",
|
||||
"slug": "agent",
|
||||
"config": {
|
||||
"cpu-weight": {
|
||||
"type": "number",
|
||||
"description": "The CPU weight of everything a build or check starts on this machine, from 1 to 10000 against 100 for an ordinary service or a login session: under load the builds get their share of that, on an idle machine they take what is free (novox/hq issue 1798). The default 20 is about a sixth of the CPU against one competing workload; a desktop may take 10.",
|
||||
"minimum": 1,
|
||||
"maximum": 10000,
|
||||
"default": 20
|
||||
},
|
||||
"io-weight": {
|
||||
"type": "number",
|
||||
"description": "The disk IO weight of everything a build or check starts, from 1 to 10000 against 100 for an ordinary service: the default 10 lets the machine's own work go first (novox/hq issue 1798).",
|
||||
"minimum": 1,
|
||||
"maximum": 10000,
|
||||
"default": 10
|
||||
},
|
||||
"memory-high": {
|
||||
"type": "string",
|
||||
"description": "The memory above which builds and checks are slowed and made to give memory back, a percentage of the machine's memory or a size (systemd's MemoryHigh): the default 50% leaves half the machine to what it runs (novox/hq issue 1798).",
|
||||
"pattern": "([1-9][0-9]?|100)%|[1-9][0-9]*[KMGT]",
|
||||
"default": "50%"
|
||||
},
|
||||
"memory-max": {
|
||||
"type": "string",
|
||||
"description": "The memory builds and checks together may never exceed, a percentage or a size (systemd's MemoryMax); a build past it is killed by the kernel and fails, so keep it above memory-high: the default 70% (novox/hq issue 1798).",
|
||||
"pattern": "([1-9][0-9]?|100)%|[1-9][0-9]*[KMGT]",
|
||||
"default": "70%"
|
||||
}
|
||||
},
|
||||
"capabilities": [
|
||||
"container-runtime"
|
||||
],
|
||||
@@ -9,7 +37,12 @@
|
||||
{
|
||||
"name": "node-build-agent",
|
||||
"scope": "node",
|
||||
"serves": ["current", "kill", "pause", "resume"]
|
||||
"serves": [
|
||||
"current",
|
||||
"kill",
|
||||
"pause",
|
||||
"resume"
|
||||
]
|
||||
}
|
||||
],
|
||||
"reads": [
|
||||
@@ -48,7 +81,7 @@
|
||||
"id": "judge-cache",
|
||||
"path": "${dir:judge-cache}",
|
||||
"class": "cache",
|
||||
"why": "the Go cache every merge check's judge is built with and the group judges kept per head; mounted into judge builds only, never into a check's containers (novox/hq ADR 0358 §6)"
|
||||
"why": "the Go cache every merge check's judge is built with and the group judges kept per head; mounted into judge builds only, never into a check's containers (novox/hq ADR 0358 \u00a76)"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -69,6 +102,19 @@
|
||||
"type": "directory",
|
||||
"mode": "0700"
|
||||
},
|
||||
{
|
||||
"id": "build-slice",
|
||||
"type": "file",
|
||||
"path": "/etc/systemd/system/mesh-build.slice",
|
||||
"mode": "0644",
|
||||
"template": "files/mesh-build.slice"
|
||||
},
|
||||
{
|
||||
"id": "build-slice-unit",
|
||||
"type": "service",
|
||||
"unit": "mesh-build.slice",
|
||||
"state": "running"
|
||||
},
|
||||
{
|
||||
"id": "agent-env",
|
||||
"type": "file",
|
||||
|
||||
Reference in New Issue
Block a user