Expose per-job resource metrics to guide Firecracker sizing and concurrency #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
We run CDK Rust CI in disposable Firecracker guests and want to choose job sizing from measurements rather than guesswork. Each runner host currently has 14 vCPUs and 28 GiB RAM, admitting three jobs with 4 vCPUs and 8 GiB each. A possible alternative is four jobs with 3 vCPUs and 6 GiB each, retaining host headroom and the same 12-vCPU admission budget.
We need per-job measurements to compare total throughput, latency, memory headroom, and failures for representative builds, tests, Clippy, and formatting checks. Host-wide tools cannot reliably attribute these costs to individual jobs. This request is to expose a coherent resource summary, building on any existing Rith timing or accounting data.
Requested measurements
Reporting and lifecycle
Expose a per-job summary through the job API and a retained structured artifact; optionally include a concise terminal summary in Forgejo job logs. Live snapshots would help diagnose jobs still running. Include job identity and workload/ref metadata already available to the controller, without logging credentials or environment secrets.
Persist collected measurements through normal teardown, failures, and controller restarts. For guest crashes or missing final reports, preserve available host-side and last guest samples and explicitly mark partial/unavailable data rather than reporting zero usage. Bound sampling overhead and storage retention, and preserve VM isolation.
Acceptance criteria
An initial implementation could prioritize guest memory, host CPU/memory, OOM reporting, and execution duration before adding detailed I/O and phase attribution.