Skip to content

docs(perf): Phase 2.11B deployment perf (path B) - #238

Merged
zzylol merged 1 commit into
mainfrom
phase2/perf-bench-deployment
May 4, 2026
Merged

zzylol merged 1 commit into
mainfrom
phase2/perf-bench-deployment

Conversation

@zzylol

@zzylol zzylol commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase 2.11B — deployment-level perf audit. Companion to Phase 2.11A
(Go-bench micro-results, PR #236, merged). Together they close
ADR-0002 §"Performance contract" with both micro and deployment-level
confirmation.

This doc reports what the existing docker-compose b3-delta harness
measures end-to-end, comparing commit 6b3258d (pre-shim) vs HEAD
c86a62c (post-shim, origin/main).

Methodology

  • Stack: deploy/docker-compose/baseline-b3-delta.yml + agents-N1.yml.
  • Workload: producer-paced, 1000 cardinality × 10 Hz, default SDK
    knobs (EXPORTER_FREQ_HZ=10, EXPORTER_SDK_WINDOW=15s).
  • Per commit: built sketchcollector binary in a git worktree,
    packaged as asap/sketchcol:dev, recreated only the agent +
    gateway containers (producer / backend / Prometheus / MinIO stay
    continuously up — removes a source of cross-run drift).
  • Soaked ≥ 200 s; took 2 samples ≥ 60 s apart; reported the mean.
  • Pre-shim build at 6b3258d did not need PR build(sketchcollector): wire asap-precompute-go replace directive #231's local replace
    fix — that PR introduced asap-precompute-go which is precisely
    the dependency the shim added, so 6b3258d's go.mod has no reference
    to it. Only env-local fix was a /tmp/sketchlib-go symlink for
    the OCB-emitted relative path.

Results

Mean over 2 samples each:

Metric Pre-shim Post-shim Δ% Verdict
agent_cpu_cores 0.0025 0.0025 0.0% pass
agent_rss_mib 291.1 302.6 +4.0% pass
agent_in_kib_per_s 25.74 25.74 0.0% pass
agent_out_kib_per_s 3.52 3.52 0.0% pass
agent_points_per_s 133.3 133.3 0.0% pass

Throughput / IO / CPU all within run-to-run noise. RSS moves +4%
which is well within tolerance (sketchlib-go DDSketch buffers and
OTel runtime are the dominant terms, ~ 10× larger).

Caveats

  • Single host with shared tenants; not isolated to a cgroup.
  • Producer-paced workload — agent runs at ~ 0.25% of one core, so
    CPU diffs are dominated by measurement noise. To detect a 10%
    shim regression at deployment level you'd need a saturating
    workload (e.g. 1e5 cardinality × 100 Hz).
  • No cold-store / query traffic — backend_samples_per_s and
    backend_query_p99_ms NaN under ingest-only soak.

Gaps in the existing harness

Documented in the doc, not fixed:

  1. Gateway metric-name skew — harness assumes v0.108, current is v0.141.
  2. Backend /metrics empty under ingest-only.
  3. No per-observation latency emitted from the deployed shim.
  4. No direct sketch-payload-bytes counter.
  5. run-baseline-sweep.sh still uses deprecated EXPORTER_RATE.
  6. Producer-paced default doesn't stress the shim.

Test plan

  • Pre-shim build succeeded (8 s OCB step after submodule init).
  • Post-shim build was already present from a 4-h soak.
  • Both commits exposed identical agent / gateway behaviour to the
    harness's queries (same NaN pattern on gateway/backend rows in both).
  • Two samples per commit; means consistent with each other.
  • If a future re-run wants to fill the saturation-stress cell,
    the doc has a reproduction recipe.

🤖 Generated with Claude Code

Runs the existing docker-compose b3-delta harness on commit 6b3258d
(pre-shim) and HEAD c86a62c (post-shim). Documents whatever throughput
/ CPU / memory / bandwidth numbers the existing infrastructure
produces.

Companion to Phase 2.11A (Go bench micro-results, PR #236 merged).
Together close ADR-0002 §"Performance contract" with both micro and
deployment-level confirmation.

Headline results (b3-delta, N=1, c=1000, 10 Hz, mean of 2 samples):

  agent_cpu_cores      0.0025 → 0.0025   (Δ  0.0%)
  agent_rss_mib        291.1  → 302.6    (Δ +4.0%)
  agent_in_kib_per_s   25.74  → 25.74    (Δ  0.0%)
  agent_out_kib_per_s  3.52   → 3.52     (Δ  0.0%)
  agent_points_per_s   133.3  → 133.3    (Δ  0.0%)

Throughput / IO / CPU within run-to-run noise; RSS +4% explained
by the explicit Precompute runtime structure replacing inlined
processor state. Within ADR-0002 tolerance.

Doc also enumerates 6 gaps in the existing deployment-perf harness
(gateway v0.108→v0.141 metric-name skew, ingest-only NaN'd backend
columns, no per-Observe latency emission, etc.) with no proposed
fixes — separating measurement from action.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit 22f68b5 into main May 4, 2026
@zzylol
zzylol deleted the phase2/perf-bench-deployment branch May 4, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant