Resource budget
What the operator may cost a cluster, and what it was last measured at.
What the operator costs is measured before it ships, so it can sit on a
small cluster next to others without surprises. The harness
(weebo-kit-perf) starts the operator's release binary against a real
apiserver (envtest), the way it runs in a pod, and measures each phase of a
run: an idle startup, a warm-up load, an idle baseline, loads of CRs
(created at once, changed, deleted), and a final idle window. Leaks
(memory, file descriptors, threads) are judged between the two idle
windows.
Budget
The limits are the kit's small-cluster budget (a few operators on a
2-4 GiB node). The last run committed with the docs (perf/weebo-forgejo.json, on 2026-10-11 with weebo-kit-perf 0.8.0) measured
200 forgejoorganizations per load; each value is the worst phase for that limit.
| Limit | Budget | Measured | |
|---|---|---|---|
| Startup: spawn → leader lease held | 15 s | 0.10 s | ok |
| Shutdown: SIGTERM → exit | 15 s | 0.01 s | ok |
| Memory at rest (median RSS of every idle window) | 64 MiB | 30.3 MiB | ok |
| Peak memory over the whole run | 192 MiB | 30.3 MiB | ok |
| CPU at rest (mean of every idle window) | 10 m | 0.67 m | ok |
| CPU time per object of a load | 50 ms | 9.45 ms | ok |
| apiserver requests at rest | 60 req/min | 41.9 req/min | ok |
| apiserver requests per object of a load | 20 req | 6.00 req | ok |
| Time for 100 objects of a load to converge | 60 s | 1.02 s | ok |
| Reconcile p95, any phase | 2 s | 0.05 s | ok |
| Memory not given back: final vs baseline idle window | 10 % | 6.28 % | ok |
| File descriptors not given back | 16 | 0 | ok |
| Threads not given back | 4 | 0 | ok |
Measuring it again
task perfThe run fails when a limit is exceeded and writes its report to
target/perf/ (Markdown and JSON). PERF_OBJECTS and PERF_IDLE_SECS
size it; WEEBO_PERF_BASELINE=<a previous JSON> compares with an earlier
run; WEEBO_PERF_REPORT_ONLY=1 reports without failing. A scheduled workflow (.github/workflows/perf.yml, the kit's) measures it again every week on a CI runner and opens a pull request with the new report and its comparison with this one. By hand, copy the JSON report to docs/perf/weebo-forgejo.json and regenerate the docs.