Page MenuHomePhabricator

Benchmark the public API endpoint (from Toolforge)
Closed, ResolvedPublic

Description

Summary

Benchmark the public API path, run from Toolforge so the rate limit doesn't apply, and record a baseline for the full user-facing path (REST Gateway + mesh + model server) and lets us quantify the overhead versus the internal-endpoint baseline.

Technical notes

  • The public endpoint is capped at 100 req/hour (LiftWingLLM, T426749); Toolforge/WMCS egress is a known network (effectively unlimited), so run from Toolforge.
  • Reuse the existing config + tool (vllm-bench / benchmark_llm.sh in benchmarks/); only change --base-url to the public endpoint (valid cert — no Host header or --insecure).
  • Run against the public models: llm-qwen3-14b (FP8, 16K) and llm-qwen36-27b (FP8, 32K).
  • Keep the config fixed and documented (model, input/output lengths, request rate, concurrency, seed) so results are comparable to the internal baseline and across future runs.
  • Compare public-path vs. internal-path results to surface the gateway/mesh overhead (mainly added latency / TTFT).

Acceptance criteria

  • Public-endpoint baseline recorded per public model, from Toolforge, using the same fixed config as the internal baseline.
  • Same metrics: throughput (req/s, output tok/s), TTFT, TPOT/ITL, E2EL (p50/p90/p99), failure rate.
  • Public-vs-internal comparison (gateway/mesh overhead) documented.
  • Results are stored (or linked) alongside the internal baseline for future comparison.
  • Procedure (incl. running from Toolforge) documented.

Event Timeline

Ran the public endpoint (api.wikimedia.org) from Toolforge, which bypasses the 100/hour cap via the known-network tier. Same fixed config as the internal baseline, so the numbers compare directly.

Config: dataset random, input/output 1024/128, --ignore-eos, --prompt-token-ids, seed 42, 200 requests/run, backend openai /v1/completions, sweep 1/8/32/64. Public base-url per model, no Host header, valid TLS (no --insecure). Background traffic was ~nil during both runs, so these compare cleanly to the internal baseline.

llm-qwen36-27b (FP8, full GPU, ml-serve1012)
Window (UTC): 2026-07-24 14:48:28 → 15:01:22 · dashboard

concreq/sout tok/stot tok/sTTFT p50TTFT p99TPOT p50TPOT p99E2EL p50E2EL p99fail
10.3634.54399.65237.55269.6526.6728.253,624.053,814.190
81.94177.992,169.13271.851,343.5839.79156.885,373.046,281.070
323.37334.813,790.76908.744,955.9974.57367.9510,519.7111,833.870
644.27420.484,794.253,543.329,710.21102.321,572.3817,080.7920,108.150

llm-qwen3-14b (FP8, 24 GB partition, ml-serve1013)
Window (UTC): 2026-07-24 15:08:31 → 15:28:51 · dashboard

concreq/sout tok/stot tok/sTTFT p50TTFT p99TPOT p50TPOT p99E2EL p50E2EL p99fail
10.2632.36294.33550.66697.9126.4828.153,913.574,152.350
81.05132.661,207.511,519.333,693.8246.9490.677,501.428,306.240
321.62204.341,863.926,999.9013,934.5496.001,243.0219,669.4122,736.470
641.63203.541,876.2523,772.0732,873.59113.252,222.2539,060.2145,496.780

*(latencies in ms)*

Public vs. internal — gateway/mesh/CDN overhead is negligible:

  • Throughput, saturation point, and E2EL match the internal baseline for both models. The only measurable cost is a small TTFT bump of ~40–300 ms at low-to-moderate concurrency, and within run-to-run noise at saturation (at conc 64 the public 27B TTFT is actually lower). Relative to multi-second E2EL, it's in the noise.
  • So the user-facing experience ≈ the internal path — the bottleneck is the model/replica, not the gateway. This also validates the internal baseline as a fair proxy for public.
  • 0 failures at every level, including conc 64 at --request-rate inf → confirms Toolforge egress gets the known-network/unlimited tier even under high concurrency.
  • The 27B-full-GPU vs 14B-24GB-partition gap holds on the public path too (~2× throughput; saturates ~64 vs ~32).
  • KV-cache usage (from the dashboard): ~5% (27B, full GPU) vs. ~65% (14B, 24 GB partition) — much less KV headroom on the partition.

Repro note: public runs use the public base-url with the Host header omitted. Found a small wrapper bug doing this — benchmark_llm.sh used ${HOST_HEADER:-default}, which ignores an empty override; fixed to ${HOST_HEADER-default} so HOST_HEADER="" sticks. Will send a follow-up patch.

achou claimed this task.

Public-endpoint baselines run from Toolforge for both models, results and overhead comparison posted above. Wrapper fix folded into CL 1319848. Closing.