Screen the cost runs for foreign load and check a pass without S3

The cost matrix shares the Docker VM with the stands and builds of other
labs. Each run now reads the VM-wide /proc/stat and the cpu.stat of the
s3 and postgres cgroups before and after the pass, and the reconciler
reports its own CPU time. Foreign CPU over the window is the busy time
minus ours minus the cost of starting a container (1.5 core-s in the VM
and 0.5 on the pinned cores, measured on the idle stand). A run with
more than 2 foreign cores in the VM or 0.25 on the pinned cores goes to
cost/disturbed and is repeated after 15 s of quiet, up to three times;
docker stats of the whole host are saved before and after the series.

The demo also runs a pass with s3 stopped: it must exit with code 1 in
bounded time, log reconcile.failed and leave PostgreSQL and the bucket
as they were.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
This commit is contained in:
Artyom
2026-10-30 06:35:59 +03:00
co-authored by Claude Opus 5.5
parent 3b3cb5bd7f
commit 5c3c238d17
5 changed files with 161 additions and 30 deletions
@@ -112,6 +112,7 @@ async def reconcile(
def report_of(command: ReconcileStorage, result: Reconciliation) -> dict[str, Any]:
usage = resource.getrusage(resource.RUSAGE_SELF)
return {
"mode": "apply" if command.apply else "dry-run",
"skipped": result.skipped,
@@ -130,7 +131,8 @@ def report_of(command: ReconcileStorage, result: Reconciliation) -> dict[str, An
"requests": {name: result.requests[name] for name in REQUESTS},
"waited_seconds": {name: round(spent, 3) for name, spent in result.waited.items()},
"hashed_bytes": result.hashed_bytes,
"max_rss_mib": round(resource.getrusage(resource.RUSAGE_SELF).ru_maxrss / 1024, 1),
"cpu_seconds": round(usage.ru_utime + usage.ru_stime, 3),
"max_rss_mib": round(usage.ru_maxrss / 1024, 1),
},
}