2026-11-26 15:49 UTC

Open-source Kubernetes harness publishes 432-trial vLLM and SGLang tuning study on one A100

state: seedheat: lowuncertainty: mediumrelevance: mediuminference-optimization vllm sglang kubernetesJohnson Shi

What is this?

Johnson Shi published the open-source `a100-inference-hillclimb` project, a Kubernetes harness for automatically tuning vLLM and SGLang inference settings. It isolates trials in GPU-pinned pods, accounts for run-to-run noise with repeat and confirmation runs, and applies workload and quality checks. The repository describes a 432-trial study of Nanbeige4.3-33B on one NVIDIA A100 80GB PCIe GPU, with results, a SQLite trial ledger, charts, and serving configurations. The supplied evidence is the project’s own GitHub description, linked from a Hacker News post; independent validation is not provided.

Why it matters

This is a practical, reproducible example of treating inference configuration as an empirical optimization problem rather than relying on defaults or noisy one-off benchmarks. If its method and results hold up on other workloads and clusters, it could help teams get more useful capacity from existing GPUs and make serving open models more accessible without adding hardware. The evidence demonstrates a tool and a study on one model and one A100 setup—not general performance gains across models or production deployments.

Current assessment

New development: Johnson Shi has published an open-source Kubernetes harness and accompanying benchmark artifacts for tuning vLLM and SGLang on a single A100 80GB PCIe. The repository describes 432 trials for Nanbeige4.3-33B; its overview also refers to a 337-trial, six-stage pipeline, so the relationship between those counts is not clear from the supplied text. The harness uses GPU-isolated pods, repeated runs and noise-calibrated confirmation, searches for serving capacity against stated TTFT/TPOT targets, and includes quality checks. The author provides winning configurations, charts, and a trial database, making the work inspectable and potentially reusable. These are project-described capabilities and results, not independently confirmed performance claims. Scope is narrow: one model and GPU configuration, with no supplied external replication or evidence of broad adoption. Track whether others reproduce the gains and whether the approach generalizes across hardware, models, and workloads.

Measured heat

now 0 pts/hpeak 2 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 110h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

11-22 01:22 (minted)⭐ origin echo-reconstructedThe GitHub repository is the original primary artifact: it contains the benchmark harness and first-person results report, with no upstream
Johnson Shi (GitHub user johnsonshi) on github (echo) · attributed from hn.story.50595165 · published time unknown
—
11-22 00:56first on hacker news · published · lag ?Automated K8s hill-climbing harness and tuning vLLM and SGLang on a single A100
johnsonshi
—
11-22 00:56amplified on hacker news 👑hn.story.50595165
johnsonshi
peak 3 · 0 comments · 98% of case engagement
11-22 01:20our radar first saw it · lag ?discovery anchor: hn.story.50595165—
pace: p14 vs 2105 stories at the 96h mark (now 110h old) — behind adobe-max-ai-agents-creative-tools-mcp (0.5x)

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnAutomated K8s hill-climbing harness and tuning vLLM and SGLang on a single A100
Retrieved article excerpt

Open article · Retrieved 2026-11-22T01:21:17.047385+00:00

# a100-inference-hillclimb

An automated Kubernetes coordinate-ascent hill-climbing harness for LLM inference engines (**vLLM** and **SGLang**), with pod-per-trial GPU isolation, 3σ run-to-run noise calibration, paired confirmation re-runs, 7–9 minute steady-state capacity searches, and automated quality gates (GSM8K, long-context passkey retrieval, and teacher-forced logprob NLL against BF16).

> **Benchmark Results & Winning Configs (`Nanbeige4.3-33B` on 1× NVIDIA A100 80GB PCIe):**
> If you are looking for the 337-trial benchmark study, all 10 charts, what worked vs. what regressed, and copy-paste `vLLM` / `SGLang` serving commands, see **[`RESULTS.md`](https://github.com/johnsonshi/a100-inference-hillclimb/blob/main/RESULTS.md)** (or query the 432-trial SQLite database directly in [`results/ledger.sqlite`](https://github.com/johnsonshi/a100-inference-hillclimb/blob/main/results/ledger.sqlite)).

[Hill-climb harness pipeline (337 trials across 6 stages)](https://github.com/johnsonshi/a100-inference-hillclimb/blob/main/assets/pipeline.png)

---

## How the Harness Works

1. **Pod-per-trial GPU isolation (`harness/runner.py`):**
   - Each trial runs as an isolated Kubernetes pod pinned to a dedicated GPU node ("lane", e.g. `n0` or `n1`), pairing the inference server container (`vLLM` or `SGLang`) with a benchmark sidecar over `localhost`.
   - The pod automatically sizes `/dev/shm` (32 GiB base plus any configured CPU KV offload region), captures startup and tail server logs, samples GPU power/clock/utilization (`nvidia-smi`) and per-process CPU usage, and writes structured trial metrics into [`results/ledger.sqlite`](https://github.com/johnsonshi/a100-inference-hillclimb/blob/main/results/ledger.sqlite).
2. **Versioned workload plans (`harness/plans.py`) and sidecar drivers:**
   - **Single-user decode (`t1n`, `t1v`):** `vllm bench serve` at concurrency 1 on disjoint SPEC-Bench prompt slices with natural stopping (`--Temperature 0.6 --top-p 0.95`, thinking on) plus an 8k-token prefill TTFT guard.
   - **Poisson capacity searches (`t2s`, `t2c`, `t2ss@r`, `t2css@r`):** Geometric rate ladder followed by bisection to find the highest Poisson arrival rate where ≥90% of requests meet both **TTFT ≤ 2 s** and **TPOT ≤ 100 ms**. Steady-state plans (`t2ss@r`, `t2css@r`) run 420–540 s steps and score only requests arriving after the initial 2–3 minute ramp-up and at least 1–1.5 minutes before arrivals end.
   - **Multi-turn agentic sessions (`t3`, `harness/t3_driver.py`):** 48 concurrent 6-turn sessions arriving at 0.2 sessions/s with a shared 3,000-token system prompt, a new 1,200-token document per turn, and 15 s think time between turns, scored by p90 TTFT across all 288 turns.
   - **Quality gate (`quality2`, `harness/quality_driver.py`):** 200 GSM8K problems (thinking on), 9 passkeys buried at 8k / 16k / 28k context, and teacher-forced negative log-likelihood (NLL) + top-1 token agreement over 3,827 greedy BF16 reference tokens.
3. **Noise-calibrated coordinate ascent (`harness/climber.py`):**
   - **Score climbs (`t1n`, `t3`):** A challenger must beat the incumbent by `max(3σ, floor)` on the same node (where `σ` is estimated from all repeated runs of the incumbent) and then repeat that win on a fresh confirmation run on the same node.
   - **Capacity climbs (`t2`, `t2c`):** Each challenger is probed for one step at `1.05×` the incumbent's capacity; if ≥90% of requests meet the SLO and a fresh confirmation run agrees, it runs a full rate search to become the new incumbent.
   - Supports coupled moves (e.g. speculative method × draft length), guided kicks, and leave-one-out ablations (`harness/campaign.py`).

---

## Repository Layout

- **[`RESULTS.md`](https://github.com/johnsonshi/a100-inference-hillclimb/blob/main/RESULTS.md)** — Full benchmark report, 10 charts (`assets/*.png`), ablation table, 3 benchmark bugs fixed, and winning `vLLM` / `SGLang` commands for `Nanbeige4.3-33B` on a single A100 80GB PCIe.
- **`harness/`** — Core Python package:
  - `space.py`: Search space (22 vLLM and 21 SGLang settings across layers L0–L6), validity rules, server flag rendering, canonical config hashing, and quality-gate numerics classes.
  - `plans.py`: Workload definitions and parameterized probe / steady-state rate-search builders.
  - `runner.py`: Kubernetes pod lifecycle, log capture, and GPU/CPU telemetry collection.
  - `bench_driver.py`, `quality_driver.py`, `t3_driver.py`: In-pod benchmark sidecar drivers.
  - `climber.py`, `campaign.py`, `score.py`, `ledger.py`, `cli.py`, `settings.py`: Coordinate-ascent climber, multi-stage campaign runner, scorer, SQLite ledger, and CLI.
- **`campaigns/`** — Declarative campaign JSONs (`main-v3.json`, `followup-v3.json`, `main.json`).
- **`results/ledger.sqlite`** — Complete 432-trial SQLite database from the A100 campaigns.
- **`assets/`** — Charts generated directly from `results/ledger.sqlite` via `tools/post_charts.py`.
- **`deploy/`** — Kubernetes manifest templates (`10-nvme-prep.yaml`, `20-nvidia-device-plugin.tmpl.yaml`, `30-download-models.tmpl.yaml`, `40-controller.tmpl.yaml`, `50-build-w8a8.tmpl.yaml`, `models.lock`).
- **`tools/`** — Operational scripts (`deploy.sh`, `pull.sh`, `stage_sharegpt.sh`, `post_charts.py`, `publish_hf_w8a8.sh`, `render.py`, `check_leaks.py`, `install_hooks.sh`).
- **`tests/`** — Offline simulator and unit tests (`sim_climb.py`, `sim_campaign.py`, `test_bench_driver.py`, `test_env.py`, `test_resolved.py`).
- **`docs/`** — Background research, book review synthesis, and engineering decision logs:
  - [`docs/book-learnings.md`](https://github.com/johnsonshi/a100-inference-hillclimb/blob/main/docs/book-learnings.md): How Philip Kiely's *Inference Engineering* and Chris Fregly's *AI Systems Performance Engineering* shaped the harness v3 design.
  - [`docs/how-providers-measure-llm-speed.md`](https://github.com/johnsonshi/a100-inference-hillclimb/blob/main/docs/how-providers-measure-llm-speed.md): How Artificial Analysis and inference providers measure TTFT, TPOT, and output speed.
  - [`docs/single-vs-two-node-serving.md`](https://github.com/johnsonshi/a100-inference-hillclimb/blob/main/docs/single-vs-two-node-serving.md): Single-node vs. two-node serving over Ethernet.
  - [`docs/a100-inference-engineering-report.md`](https://github.com/johnsonshi/a100-inference-hillclimb/blob/main/docs/a100-inference-engineering-report.md): Initial A100 benchmarking and methodology report.
  - [`docs/decisions.md`](https://github.com/johnsonshi/a100-inference-hillclimb/blob/main/docs/decisions.md): Chronological engineering decision log across all harness revisions.

---

## Quickstart

### 1. Run the offline simulator tests (no GPU cluster or `.env` required)

```
python3 -m tests.sim_climb
python3 -m tests.sim_campaign
python3 -m tests.test_bench_driver
python3 -m tests.test_env
python3 -m tests.test_resolved
```

### 2. Inspect `results/ledger.sqlite` or regenerate the charts

```
python3 -m harness.cli status --campaign main-v3
python3 -m harness.cli report --campaign main-v3:climb-t1n-vllm
python3 tools/post_charts.py results/ledger.sqlite assets
```

### 3. Deploy on your own Kubernetes GPU cluster

Environment-specific identifiers (kube context, node names, container registry, subscription) live only in a gitignored `.env` and are blocked from commits by `tools/check_leaks.py`:

```
cp .env.example .env          # fill in your cluster context, lane nodes, and registry
tools/install_hooks.sh        # install pre-commit and pre-push leak-check hooks
tools/deploy.sh main-v3       # build controller image and launch campaign
```

You can also run individual trials or climbs from the CLI:

```
python3 -m harness.cli run --engine vllm --set variant=int4 --plan t1n --lane n0
python3 -m harness.cli batch --file configs.json --plan t2s --campaign screen-1
python3 -m harness.cli climb --track t2 --start start.json --campaign climb-t2
```
johnsonshi30
🟧 echo.github ⭐The GitHub repository is the original primary artifact: it contains the benchmark harness and first-person results report, with no upstream Johnson Shi (GitHub user johnsonshi)——

Interpretation history

Decision trace