Configuration
Configuration reference for the CI Sizer collector and receiver binaries.
CI Sizer is a two-binary Go application that monitors CI/CD runner resource usage and provides right-sizing recommendations, energy consumption estimates, and carbon footprint tracking. It consists of a collector (runs alongside runners, collects metrics from /proc) and a receiver (aggregates data, serves a web dashboard, and provides a REST API). The two components communicate via REST — the collector pushes a run summary to the receiver on shutdown.
CI Sizer reads /proc directly with zero instrumentation — no agent installation or code changes are required in CI jobs.
| Provider | Injection Mechanism | ci_provider value |
|---|---|---|
| Forgejo Actions | GARM runner lifecycle | forgejo |
| GitHub Actions | GARM runner lifecycle | github |
| GitLab CI | MutatingAdmissionWebhook | gitlab |
The collector works identically across all providers — it reads /proc and pushes to the receiver. The injection mechanism (how the collector gets into the CI pod) differs per provider.
/proc/stat and /proc/<PID>/statusmemory.events and applies exponential backoff recoveryThe collector runs as a sidecar in CI pods with shared PID namespace. It samples /proc on a configurable interval, groups processes by container via cgroup paths, and pushes a run summary to the receiver on shutdown (SIGINT/SIGTERM).
The receiver stores metric summaries in SQLite, exposes query and sizing APIs, and serves a web UI at /ui. Internally it is decomposed into focused subpackages: auth/ (OIDC, gateway JWT, middleware), store/ (SQLite persistence), sizing/ (algorithm and overview aggregation), reporting/ (dashboard KPIs and aggregation), garm/ (GARM WebSocket client), pushtoken/ (HMAC token generation), and web/ (embedded static assets and HTML templates).
┌─────────────────────────────────────────────┐ ┌──────────────────────────┐
│ CI/CD Pod (shared PID namespace) │ │ Receiver Service │
│ │ │ │
│ ┌───────────┐ ┌────────┐ ┌───────────┐ │ │ POST /api/v1/metrics │
│ │ collector │ │ runner │ │ sidecar │ │ │ │ │
│ │ │ │ │ │ │ │ push │ ▼ │
│ │ reads │ │ │ │ │ │──────▶│ ┌────────────┐ │
│ │ /proc for │ │ │ │ │ │ │ │ SQLite │ │
│ │ all PIDs │ │ │ │ │ │ │ └────────────┘ │
│ └───────────┘ └────────┘ └───────────┘ │ │ │ │
│ │ │ ▼ │
└─────────────────────────────────────────────┘ │ GET /api/v1/sizing/... │
│ GET /ui │
└──────────────────────────┘
/ui to explore metrics and sizing recommendationsFor Kubernetes deployment examples, see the Configuration page.
| Guide | Description |
|---|---|
| Configuration | All collector and receiver flags, environment variables, deployment examples |
| Web Dashboard | Using the web UI for resource analysis and sizing recommendations |
| Sizing Algorithm | Algorithm steps, buffers, floors, overrides, enforcement modes |
| OOM Detection | Confidence-gated sizing, OOM recovery, commit status notifications |
| Energy Estimation | Power models, carbon sources, TDP database, and academic references |
| GitLab Integration | MutatingAdmissionWebhook setup for GitLab CI |
| KPI Benchmark | Benchmark methodology and resource optimization results |
| API Reference | All endpoints, authentication, request/response examples |
Configuration reference for the CI Sizer collector and receiver binaries.
Using the CI Sizer web dashboard for resource analysis and sizing recommendations.
How CI Sizer calculates resource sizing recommendations for runners.
How CI Sizer detects out-of-memory events and adapts sizing recommendations through confidence phases.
Methodology and sources for CI Sizer’s energy consumption and carbon footprint estimates.
REST API reference for the CI Sizer collector and receiver.
Integrating CI Sizer with GitLab CI via the MutatingAdmissionWebhook.
Benchmark methodology and results demonstrating CI Sizer’s resource optimization and energy savings.