bench: defaults — parallel 8, tps-floor 15 scheduler-driven, stall timeout auto-scales with steps (bug-2222)
Browse files
bench/package_courier/README.md
CHANGED
|
@@ -66,13 +66,22 @@ Offline graph-routing tests: `pytest test_agent_graph.py -q`.
|
|
| 66 |
- **pooled** (default): the chat-templated system+tools prefix (~1.5k
|
| 67 |
tokens) is pinned once as a PolyKV pool; every session attaches and
|
| 68 |
reuses it (`cache_n >= prefix_len` on every turn). Worker count is
|
| 69 |
-
dynamic
|
| 70 |
-
while per-session tps holds above the
|
| 71 |
-
engine saturates below it (live worker
|
| 72 |
-
plotted in the report).
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
## Running
|
| 78 |
|
|
|
|
| 66 |
- **pooled** (default): the chat-templated system+tools prefix (~1.5k
|
| 67 |
tokens) is pinned once as a PolyKV pool; every session attaches and
|
| 68 |
reuses it (`cache_n >= prefix_len` on every turn). Worker count is
|
| 69 |
+
**dynamic by default** (`--tps-floor` defaults to **15**): the
|
| 70 |
+
scheduler grows the fleet while per-session tps holds above the
|
| 71 |
+
floor and shrinks it when the engine saturates below it (live worker
|
| 72 |
+
count and target are both plotted in the report). Pass
|
| 73 |
+
`--tps-floor 0` only when you deliberately want a fixed fleet.
|
| 74 |
+
- **naive** (`--no-polykv`): fixed worker fleet (no scheduler — the
|
| 75 |
+
floor defaults to 0 here), no pool — every turn re-prefills its full
|
| 76 |
+
prompt. This is the baseline that shows what prefix sharing is worth.
|
| 77 |
+
|
| 78 |
+
Defaults reflect that self-compensating settings are the point of the
|
| 79 |
+
benchmark: engine `--parallel` defaults to **8**, the pooled worker
|
| 80 |
+
fleet is floor-driven, and the work server's stall timeout auto-scales
|
| 81 |
+
with chain length (`max(900 s, steps × 60 s)`; the timer resets on
|
| 82 |
+
delivery, so long chains need the headroom — override with
|
| 83 |
+
`--timeout`). Fixed worker counts are for the naive A/B leg, not for
|
| 84 |
+
normal runs.
|
| 85 |
|
| 86 |
## Running
|
| 87 |
|
bench/package_courier/run.py
CHANGED
|
@@ -49,7 +49,7 @@ def main():
|
|
| 49 |
ap.add_argument("--engine-url", help="attach to a running engine; skip boot")
|
| 50 |
ap.add_argument("--engine-port", type=int, default=8231)
|
| 51 |
ap.add_argument("--ctx", type=int, default=16384)
|
| 52 |
-
ap.add_argument("--parallel", type=int, default=
|
| 53 |
ap.add_argument("--pools", type=int, default=8)
|
| 54 |
ap.add_argument("--ctk", default="q8_0")
|
| 55 |
ap.add_argument("--ctv", default="q8_0")
|
|
@@ -64,13 +64,17 @@ def main():
|
|
| 64 |
ap.add_argument("--packages", type=int, default=100)
|
| 65 |
ap.add_argument("--steps", type=int, default=10)
|
| 66 |
ap.add_argument("--seed", type=int, default=1)
|
| 67 |
-
ap.add_argument("--timeout", type=float, default=
|
|
|
|
|
|
|
| 68 |
ap.add_argument("--work-port", type=int, default=8600)
|
| 69 |
# agents
|
| 70 |
ap.add_argument("--workers", type=int, default=4)
|
| 71 |
ap.add_argument("--max-workers", type=int, default=16)
|
| 72 |
ap.add_argument("--no-polykv", action="store_true")
|
| 73 |
-
ap.add_argument("--tps-floor", type=float, default=
|
|
|
|
|
|
|
| 74 |
ap.add_argument("--temperature", type=float, default=0.0)
|
| 75 |
ap.add_argument("--max-tokens", type=int, default=256)
|
| 76 |
# output
|
|
@@ -81,6 +85,10 @@ def main():
|
|
| 81 |
help="just regenerate report.html from --out's existing run "
|
| 82 |
"data (no engine/bench); same as: report_html.py <out>/run")
|
| 83 |
cfg = ap.parse_args()
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
if cfg.report_only:
|
| 86 |
from report_html import build
|
|
|
|
| 49 |
ap.add_argument("--engine-url", help="attach to a running engine; skip boot")
|
| 50 |
ap.add_argument("--engine-port", type=int, default=8231)
|
| 51 |
ap.add_argument("--ctx", type=int, default=16384)
|
| 52 |
+
ap.add_argument("--parallel", type=int, default=8)
|
| 53 |
ap.add_argument("--pools", type=int, default=8)
|
| 54 |
ap.add_argument("--ctk", default="q8_0")
|
| 55 |
ap.add_argument("--ctv", default="q8_0")
|
|
|
|
| 64 |
ap.add_argument("--packages", type=int, default=100)
|
| 65 |
ap.add_argument("--steps", type=int, default=10)
|
| 66 |
ap.add_argument("--seed", type=int, default=1)
|
| 67 |
+
ap.add_argument("--timeout", type=float, default=None,
|
| 68 |
+
help="work-server stall timeout in s (timer resets on "
|
| 69 |
+
"delivery); default max(900, steps*60)")
|
| 70 |
ap.add_argument("--work-port", type=int, default=8600)
|
| 71 |
# agents
|
| 72 |
ap.add_argument("--workers", type=int, default=4)
|
| 73 |
ap.add_argument("--max-workers", type=int, default=16)
|
| 74 |
ap.add_argument("--no-polykv", action="store_true")
|
| 75 |
+
ap.add_argument("--tps-floor", type=float, default=None,
|
| 76 |
+
help="worker scheduler tps floor; default 15 (pooled). "
|
| 77 |
+
"Naive mode has no scheduler: default 0 (fixed fleet)")
|
| 78 |
ap.add_argument("--temperature", type=float, default=0.0)
|
| 79 |
ap.add_argument("--max-tokens", type=int, default=256)
|
| 80 |
# output
|
|
|
|
| 85 |
help="just regenerate report.html from --out's existing run "
|
| 86 |
"data (no engine/bench); same as: report_html.py <out>/run")
|
| 87 |
cfg = ap.parse_args()
|
| 88 |
+
if cfg.tps_floor is None:
|
| 89 |
+
cfg.tps_floor = 0.0 if cfg.no_polykv else 15.0
|
| 90 |
+
if cfg.timeout is None:
|
| 91 |
+
cfg.timeout = max(900.0, cfg.steps * 60.0)
|
| 92 |
|
| 93 |
if cfg.report_only:
|
| 94 |
from report_html import build
|
bench/package_courier/work_server.py
CHANGED
|
@@ -260,9 +260,13 @@ def main():
|
|
| 260 |
ap.add_argument("--packages", type=int, default=100)
|
| 261 |
ap.add_argument("--steps", type=int, default=10)
|
| 262 |
ap.add_argument("--seed", type=int, default=1)
|
| 263 |
-
ap.add_argument("--timeout", type=float, default=
|
|
|
|
|
|
|
| 264 |
ap.add_argument("--port", type=int, default=8600)
|
| 265 |
args = ap.parse_args()
|
|
|
|
|
|
|
| 266 |
|
| 267 |
work = Work(args.packages, args.steps, args.seed, args.timeout)
|
| 268 |
srv = ThreadingHTTPServer(("127.0.0.1", args.port), make_handler(work))
|
|
|
|
| 260 |
ap.add_argument("--packages", type=int, default=100)
|
| 261 |
ap.add_argument("--steps", type=int, default=10)
|
| 262 |
ap.add_argument("--seed", type=int, default=1)
|
| 263 |
+
ap.add_argument("--timeout", type=float, default=None,
|
| 264 |
+
help="stall timeout in s (timer resets on delivery); "
|
| 265 |
+
"default max(900, steps*60)")
|
| 266 |
ap.add_argument("--port", type=int, default=8600)
|
| 267 |
args = ap.parse_args()
|
| 268 |
+
if args.timeout is None:
|
| 269 |
+
args.timeout = max(900.0, args.steps * 60.0)
|
| 270 |
|
| 271 |
work = Work(args.packages, args.steps, args.seed, args.timeout)
|
| 272 |
srv = ThreadingHTTPServer(("127.0.0.1", args.port), make_handler(work))
|
docs/features/package_courier_harness.md
CHANGED
|
@@ -79,7 +79,12 @@ The launcher boots all three processes: the opencoti-llamafile server
|
|
| 79 |
(model, `-c`, `--parallel`, `--polykv-max-pools`, KV types, MTP flags —
|
| 80 |
all pass-through), the work server, and the agent app.
|
| 81 |
|
| 82 |
-
Defaults
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
**Qwen3.6-27B-Omnimerge-v4 (bs2)** — hybrid GDN + NextN MTP, i.e. the
|
| 84 |
serving target and the hardest pool path; everything overridable.
|
| 85 |
|
|
|
|
| 79 |
(model, `-c`, `--parallel`, `--polykv-max-pools`, KV types, MTP flags —
|
| 80 |
all pass-through), the work server, and the agent app.
|
| 81 |
|
| 82 |
+
Defaults (updated 2026-07-16, user decision + bug-2222): 100 packages ×
|
| 83 |
+
10 steps; engine `--parallel 8`; pooled worker fleet driven by
|
| 84 |
+
`--tps-floor 15` (fixed worker counts are only for the naive A/B leg,
|
| 85 |
+
where the floor defaults to 0); work-server stall timeout auto-scales
|
| 86 |
+
`max(900 s, steps × 60 s)` — the stall timer resets only on delivery,
|
| 87 |
+
so long chains (e.g. 55 steps) need the scaled window; model =
|
| 88 |
**Qwen3.6-27B-Omnimerge-v4 (bs2)** — hybrid GDN + NextN MTP, i.e. the
|
| 89 |
serving target and the hardest pool path; everything overridable.
|
| 90 |
|