Reducing Batch Makespan for LLM Agent Workloads through Inference-Environment Coordination
Wei Feng, Meiling Chen, Boxiao Chen, Lu Liu, Bin Zi, Libin Ye, Xingyu Lu, Lei Xu, Jun Zhou
cs.DC, cs.AI
2026-11-12
Coordinated cache allocation, routing, and environment-job scheduling cut batch makespan for LLM agent workloads 10.4%–65.0% across four benchmarks, with scores unchanged.
Agentic model development runs the same batch jobs over and over: benchmark evaluation, synthetic-data generation, RL rollouts. Downstream stages wait for the whole batch, so batch makespan, the time to finish every task in a batch, gates iteration speed. Conventional serving systems optimize per-request latency (TTFT, TPOT) and have little design to offer for how fast a batch drains.
Each trajectory alternates between LLM inference and environment interaction (tools, code, external services), and three bottlenecks compound. Hybrid models such as Ling-3.0-Flash (MLA attention mixed with Kimi Delta Attention) need both KV cache and recurrent state for cross-turn reuse; SGLang keeps them in two pools under one memory budget, and a wrong ratio exhausts one pool while the other idles. Across workers, requests from one trajectory that land on different machines lose their cache, while strict affinity concentrates load. Harnesses like MCP-Atlas and τ3-bench enforce a single concurrency limit coupling sample admission to environment execution, so when the environment supports less concurrency than the GPUs, inference sits idle.
Five changes: three inside SGLang, two in the harness layer.
Ablations use controlled replay: real inference plus recorded environment responses and durations, with stage dependencies fixed, so configurations compare on identical work.
Live end-to-end runs, three per configuration (Ling-3.0-Flash is 124B total / 5.1B active, Ling-3.1-Flash 560B / 25B, both on H20 GPUs; makespan in minutes):
| Model / benchmark | Baseline | Optimized | Reduction |
| Ling-3.0 / BFCL | 68.4 | 49.2 | 28.1% |
| Ling-3.0 / SWE-bench Multilingual | 166.9 | 149.5 | 10.4% |
| Ling-3.0 / WideSearch | 186.7 | 116.7 | 37.5% |
| Ling-3.0 / MCP-Atlas | 466.1 | 163.0 | 65.0% |
| Ling-3.1 / SWE-bench Multilingual | 234.1 | 185.1 | 20.9% |
| Ling-3.1 / MCP-Atlas | 333.5 | 128.5 | 61.5% |
Scores stay aligned with baselines (BFCL 73.0 vs 75.65, SWE 87.16 vs 88.33); the speedup does not trade away quality.
The ablations carry the argument. Concurrency has a cliff: raising it from 147 to 157 on SWE, 644 to 859 on BFCL, and 123 to 147 on WideSearch pushes new-prefill work to roughly 11x, 3x, and 9x its previous level as cache gets evicted, and throughput falls. At SWE concurrency 289, FCFS exceeds a 13-hour limit while RP finishes in 128.2 minutes; priority-calculation time over the batch is 303 s for RP against 735 s for LPM and 1704 s for DFS-weight. On two workers, LBCH beats SGLang's cache-aware routing by 1.5%–13.6%. Matched-concurrency runs isolate allocation: on SWE with Ling-3.0-Flash, the higher-concurrency baseline drops to 87.5% cache reuse while the optimized config holds 98.6% at the same concurrency and cuts makespan 24.4%; Ling-3.1-Flash shows 80.4% vs 98.3% and a 39.1% cut. On MCP-Atlas, capacity separation alone (still FCFS) takes makespan from 466.1 to 168.2 minutes; CAAS adds 3.1%.
Per-request latency moves the other way: against the low-concurrency baseline, the optimized config has higher TTFT and TPOT. Batch efficiency and per-request latency are different objectives.
Any team running agent tasks in bulk can use this. The largest win, capacity separation, lives in the harness layer: no model or engine changes, and any MCP-based evaluation framework can copy it. Cache ratios for hybrid models are a real operational question, and SGLang's default mambafullmemoryratio need not match your workload; the paper provides a closed-form way to set it from historical profiles. The methods already run in Ling-3.x development.
The inference-side items individually contribute a few percent to about 30%: incremental where the environment is fast, decisive where it is constrained.
Baselines are all SGLang-native policies (FCFS, LPM, DFS-weight, cache-aware routing); peer systems named in related work, such as Autellix, Helium, SAGA, and ConServe, get no empirical comparison. Validation covers only the authors' Ling-3.0/3.1-Flash on H20 GPUs; a pure Transformer has a single KV-cache pool, so half the capacity model does not apply. The model assumes task distributions stay similar across nearby checkpoints, and the authors admit a mean footprint does not reflect the trajectories active at a given moment, so local calibration may still be needed. The RP label set and actual GPU cache residency can desync in both directions, which the paper itself analyzes. CAAS gains are 1.9%–3.5% in replay and depend on two hyperparameters, and the L5 tail metric is not comparable across admission policies because the tasks composing the tail differ. Replay measures execution efficiency, not semantic correctness, and live runs carry trajectory-level randomness.