Skip to content
All experiments

8 agents

in a simulated coding workload, at a 4.9 s wait per turn on vLLM with no errors. At 16, waits reach 16.5 s

Hardware, 23 and 24 September 2026

How many coding agents can one RTX 4090 serve?

Qwen3.8-27B on one rented RTX 4090, through five engine setups, rising load and real coding agents.

Serving agents from one card

pi
A coding agent that runs in a terminal. Each turn, it sends the whole conversation so far, with its latest tool output, to a model server and waits for the reply.
Engine
The server program that runs the model. We tried four: Ollama, llama.cpp, SGLang and vLLM, on two rented machines with the same card, host 1 and host 2.
Tokens
The pieces of words a model reads and writes. Reading the prompt is prefill and writing the reply is decode. Speed is in tokens a second, tok/s.
Wait
The time from sending a turn to the first token of its reply. Half the waits were shorter than the median, and 9 in 10 shorter than the p90.
KV cache and pool
The KV cache is the memory a model keeps of each conversation. The engine sets aside part of the GPU for it, the pool, counted in tokens; pinned means we set its size directly. fp8 and int4 in a setup's name store the cache in 8 or 4 bits, and bf16 in 16. Every engine ran a 4-bit version of the model's weights.
Served from cache
When the start of a prompt is still in the pool from an earlier turn, that input is not read again. A miss means re-reading the whole conversation.
Recommended setup
vLLM with the KV cache in int4 and its pool pinned at 4.5 GiB, 246,094 tokens.
Two tests
Simulated pi sessions, 8 turns each, from 1 to 16 agents at once. And bursts of 1k-token prompts, each answered with 256 tokens, from 1 to 16 users at once.

What we found

  • Eight agents fit on one card

    On simulated pi sessions, the recommended vLLM setup served 8 agents with a median wait of 4.9 s and no errors, a comfortable load. At 12 the wait was 7.4 s, still usable; at 16 it reached 16.5 s, too slow to use.

  • Keeping the cache in 4 bits made room for more agents

    On host 1, vLLM with its KV cache in 4 bits, and slightly more GPU memory, had a pool of 180,558 tokens against 84,898 in 8 bits, and waited 5.0 s at 8 agents instead of 7.4 s. At 12 agents, bigger pools waited less.

  • vLLM held up best under load

    In a separate test of 16 users each sending a 1k-token prompt, vLLM wrote 368 tok/s in total and began replies in about 2 s. The next best, llama.cpp, wrote 141 tok/s and took 16.8 s to begin.

  • Each other engine hit a limit of its own

    Ollama runs this model one request at a time: replies took 49 s to start at 16 users. SGLang reserves extra memory per request, capping it at 4 running: 18.7 s waits at 8 agents. llama.cpp's shared pool overflowed, failing 8 of 54 requests.

  • gpt-oss-20b was far quicker on the same card

    With the same pool of about 246,000 tokens, gpt-oss-20b waited 0.26 s per turn at 8 agents where Qwen3.8 waited 4.9 s. It reads 3.6B of its weights per token, Qwen3.8 all 27B, but the cause is not isolated, and quality was not compared.

  • Speculative decoding helped one person chatting and hurt a team

    In speculative decoding, the model's multi-token prediction (MTP) head guesses 2 tokens and the model checks them at once. On vLLM it lifted one user's decode from 52.5 to 82.3 tok/s, but shrank the pool, and 8 agents' sessions took 236 s, not 101 s.

The results

By eight agents, the recommended vLLM setup waits least

Simulated pi sessions. At one agent every engine is close; up to 4 agents, SGLang had the shortest median wait.

The setup we recommendThe othersSolid to the median, faint to p90

1 agent at once

  • Ollama1 s, 1.1 s at p90
  • llama.cpp0.8 s, 1 s at p90
  • SGLang0.6 s, 0.7 s at p90
  • vLLM fp80.7 s, 0.9 s at p90
  • vLLM int4 pinned0.8 s, 0.9 s at p90

4 agents at once

  • Ollama6.4 s, 13.4 s at p90
  • llama.cpp6 s, 7.9 s at p90
  • SGLang1.7 s, 5.6 s at p90
  • vLLM fp81.9 s, 2.8 s at p90
  • vLLM int4 pinned2.3 s, 3.5 s at p90

8 agents at once

  • Ollama22.5 s, 38 s at p90
  • llama.cpp10.7 s, 14.1 s at p90 with failures
  • SGLang18.7 s, 29.6 s at p90
  • vLLM fp87.4 s, 15.7 s at p90
  • vLLM int4 pinned4.9 s, 7.2 s at p90

Pools: llama.cpp 65,536 tokens, SGLang about 52,200, vLLM fp8 84,898 and vLLM int4 pinned 246,094. Eight sessions at their longest, about 12.6k tokens each, need about 100,000, so only the int4 pool could hold all of them. llama.cpp failed 8 of 54 requests at 8 agents: 5 rejected when its shared pool overflowed and 3 cut off mid-stream. Ollama's replies were shorter, so only its waits compare.

vLLM's total output keeps rising with users; the others level off

A 1k prompt and 256 tokens out. The total also counts each reply's wait for its first token. Ollama writes each reply at 102 tok/s but serves this model one request at a time, so its total stays flat at about 78. SGLang stops rising once its 4 running slots are full.

Ollamallama.cppSGLangvLLM fp8vLLM int4 pinned

0100200300400tok/s1Ollama78llama.cpp42SGLang50vLLM fp850vLLM int4 pinned494Ollama78llama.cpp109SGLang116vLLM fp8156vLLM int4 pinned1528Ollama78llama.cpp142SGLang121vLLM fp8255vLLM int4 pinned24816Ollama78llama.cpp141SGLang122vLLM fp8368vLLM int4 pinned357Users at once, on a log scale

vLLM starts replies within about 2 s at 16 users; the others climb

The same runs. Once each engine's slots are full, the rest wait in line for their first token.

Ollamallama.cppSGLangvLLM fp8vLLM int4 pinned

01020304050seconds1Ollama0.8llama.cpp0.6SGLang0.3vLLM fp80.3vLLM int4 pinned0.34Ollama10.5llama.cpp2.5SGLang1.1vLLM fp81.3vLLM int4 pinned1.28Ollama23.3llama.cpp3.4SGLang10.4vLLM fp81.8vLLM int4 pinned1.316Ollama49.4llama.cpp16.8SGLang26.1vLLM fp82.2vLLM int4 pinned1.8Users at once, on a log scale

On the recommended setup, the wait more than triples from 8 agents to 16

Simulated pi sessions, with no errors at any load.

  • 1 agent

    Wait per turn, median and p900.8 s, 0.9 s
    tok/s per agent50.1
    Input served from cache77%
  • 2 agents

    Wait per turn, median and p901.3 s, 1.5 s
    tok/s per agent45.9
    Input served from cache76%
  • 4 agents

    Wait per turn, median and p902.3 s, 3.5 s
    tok/s per agent41
    Input served from cache70%
  • 8 agents

    Wait per turn, median and p904.9 s, 7.2 s
    tok/s per agent30.1
    Input served from cache69%
  • 12 agents

    Wait per turn, median and p907.4 s, 14.6 s
    tok/s per agent20.6
    Input served from cache54%
  • 16 agents

    Wait per turn, median and p9016.5 s, 29.6 s
    tok/s per agent6.4
    Input served from cache11%

Past 8 agents vLLM made extra requests wait rather than fail them: up to 13 waited at once under 12 to 16 agents. A team whose agents are not all mid-turn at once should fit more, perhaps 10 to 15, which is a projection and not a measurement.

Among the int4 pools, size showed at twelve agents

On this agent workload, the three int4 pools waited the same at 8 agents.

  • fp8, 0.95, host 1

    Pool, tokens84,898
    Wait at 8 agents7.4 s
    Wait at 12, median and p90not run
    From cache at 12not run
  • int4, 0.97, host 1

    Pool, tokens180,558
    Wait at 8 agents5.0 s
    Wait at 12, median and p9011.7 s, 29.9 s
    From cache at 1212%
  • int4, pinned 4.5 GiB, host 2

    Pool, tokens246,094
    Wait at 8 agents4.9 s
    Wait at 12, median and p907.4 s, 14.6 s
    From cache at 1254%
  • int4, 0.97, host 2

    Pool, tokens298,255
    Wait at 8 agents5.1 s
    Wait at 12, median and p906.7 s, 11.1 s
    From cache at 1269%

0.95 and 0.97 are the share of GPU memory vLLM was given. A likely reason for the shorter waits, not isolated: each cache miss means re-reading about 12k tokens. We still recommend the pinned pool. At 0.97, vLLM sizes the pool from a profiling run, which measured 2.7 GiB of activations on host 1 and 0.5 GiB on host 2 with the same flags, and fp8 KV at 0.97 on host 2 ran out of memory at 4 requests at once. Pinning 4.5 GiB leaves about 1 GB spare.

gpt-oss-20b against Qwen3.8-27B on the same card

Both on vLLM with the same pool, about 246,000 tokens: 4.5 GiB at int4 for Qwen3.8 and 6 GiB at bf16 for gpt-oss-20b, which stores 24 KiB per token against Qwen3.8's 16 KiB. Each row has its own scale. Replies and cache hits also differed (79% of input from cache at 8 agents against 69%).

Qwen3.8-27Bgpt-oss-20b

  • Agent turn wait at 8 agents

    Median. Shorter is better

    Qwen3.8 4.9 s
    gpt-oss 0.26 s
  • Agent turn wait at 16 agents

    Median. Shorter is better

    Qwen3.8 16.5 s
    gpt-oss 0.88 s
  • Prefill, 16k tokens

    tok/s. Longer is better

    Qwen3.8 2,199
    gpt-oss 13,196
  • Decode, 1 user

    tok/s. Longer is better

    Qwen3.8 52.5
    gpt-oss 197.6
  • Decode, 16 at once

    Total tok/s. Longer is better

    Qwen3.8 357
    gpt-oss 1,019

gpt-oss-20b's agent replies stopped naturally at 64 to 74 tokens instead of a forced 150, so compare turn waits, not session times.

Speculative decoding speeds one chat and slows a team

vLLM's speculative decoding against the same setup without it: int4 KV at 0.97 on host 1, not the recommended setup. MTP shrank the cache pool from 180,558 tokens to 108,814, and at 8 agents no input was served from cache, likely part of the slowdown, not isolated.

Without MTPWith MTP

  • Decode, 1 user

    tok/s. Longer is better

    Without 52.5
    With 82.3
  • Session time, 1 agent

    Shorter is better

    Without 36 s
    With 37 s
  • Session time, 8 agents

    Shorter is better

    Without 101 s
    With 236 s
  • First token, 16 at once

    Shorter is better

    Without 1.8 s
    With 6.7 s
  • Input served from cache, 1 agent

    Longer is better

    Without 77%
    With 51%
  • Input served from cache, 8 agents

    Longer is better

    Without 63%
    With 0%
Every numberPrefill, decode under load, gpt-oss-20b on every engine, how long context stays cached, and the real pi runsShow

Swipe the table sideways for more columns.

Prefill of one request, tok/sOllamallama.cppSGLangvLLM fp8vLLM int4 pinned
1k1,2261,7702,9652,8142,809
8k2,3002,5272,9022,8882,492
16k2,2972,5382,8002,7842,199
32k2,263, see below2,4342,5882,5681,768

Ollama's context was 32,768 tokens. Of its three 32k prompts, the one over that limit, 35.2k, was silently cut to 16,386 tokens. int4 KV is slower on long cold prompts: on host 2, a 32k prompt took 18.4 s to first token with int4 KV and 15.1 s with fp8 KV.

Swipe the table sideways for more columns.

Decode at once: per user, total, first tokenOllamallama.cppSGLangvLLM fp8vLLM int4 pinned
1102.2, 78, 0.8 s46.7, 42, 0.6 s53.5, 50, 0.3 s53.7, 50, 0.3 s52.5, 49, 0.3 s
4101.8, 78, 10.5 s36.5, 109, 2.5 s45.1, 116, 1.1 s48.5, 156, 1.3 s45.9, 152, 1.2 s
8102.6, 78, 23.3 s23.1, 142, 3.4 s47.8, 121, 10.4 s41.8, 255, 1.8 s36.7, 248, 1.3 s
16102.4, 78, 49.4 s22, 141, 16.8 s46, 122, 26.1 s28.9, 368, 2.2 s26.5, 357, 1.8 s

Swipe the table sideways for more columns.

gpt-oss-20bvLLMllama.cppOllamaSGLang
Prefill 1k, 8k and 32k, tok/s15,624, 15,510, 10,0697,274, 11,198, 10,5265,958, 10,205, 9,9772,642, 4,949, 4,938
Decode, 1 user, tok/s197.6242.6191.824.3
16 at once: per user, total, first token74.7, 1,019, 0.6 s77.4, 484, 5.1 s100.6, 336, 9.2 s8.0, 118, 2.9 s
Agent turn wait p50 and p90, 1 agent0.14 and 0.15 s0.21 and 0.22 s0.25 and 0.31 s0.46 and 0.48 s
Agent turn wait p50 and p90, 8 agents0.26 and 0.48 s1.64 and 3.10 s1.40 and 2.02 s1.06 and 1.50 s
Errors0000

All on host 2 with their own setups: vLLM 0.30.0 with bf16 KV pinned at 6 GiB, llama.cpp b11118 with ggml-org's MXFP4 GGUF, 8 slots and a 128k shared pool, Ollama 0.34.4 with 4 parallel requests, and SGLang 0.5.20 with bf16 KV and 16 running. Ollama's 34.1k prompt was silently cut to 16,386 tokens, so its 32k prefill is not of an intact prompt.

Swipe the table sideways for more columns.

Idle gapQuiet server4 other agents8 other agents
5 s93%93%93%
30 snot run94%0%
1 min94%97%0%
2 minnot run0%0%
4 minnot run0%0%
5 min97%not runnot run
8 minnot runinvalid0%
15 min88%not runnot run

Share of a context of about 12k tokens still cached after each gap, each gap with its own context. After an eviction, that turn took 5.7 to 21 s to start. Only one pool size was tested. "not run" means that gap was not tested, and "invalid" means its setup request failed.

Swipe the table sideways for more columns.

Serverpi thinkingAgents at oncePassedWall time
vLLM int4, host 1off1, 4 and 813 of 1324.1, 26.0 and 88.4 s
vLLM int4, host 1medium1, 4 and 813 of 1323.6, 58.5 and 70.3 s
vLLM int4 pinned, host 2medium88 of 896.1 s

34 of 34 runs passed, and no agent edited the test files. Tasks were on small repositories with failing tests.

How we ran it

Question
Can one rented RTX 4090 serve Qwen3.8-27B to a team using the pi coding agent, and with which engine and quantization?
Machine
One RTX 4090, 24,564 MiB, Ryzen 9 7950X, 61 GB, on RunPod EU-RO-1, on two hosts with the same volume: host 1 on 23 September 2026 and host 2 on 24 September.
Engines
Ollama 0.34.3 with its Q4_K_M build and speculative decoding on by default; it ran this model one request at a time whatever its parallel setting. llama.cpp b11118 with UD-Q4_K_XL, 8 slots and a 64k shared pool. SGLang 0.5.19 with INT4, fp8 KV and 4 running requests. vLLM 0.30.0 with INT4, fp8 KV and an 84,898-token pool.
Load
A load generator on the pod, so no network is in the numbers, with real Python source, unique per request. The agent scenario uses pi's real system prompt and 4 tools, for 8 turns of about 1.5k new tokens in and 150 out, growing to about 12.6k tokens. Between turns each simulated agent paused only 0.3 to 1.5 s, so every agent was busy nearly all the time.
Real agents
Real pi agents on a Mac, up to 8 at once.
The setup we recommend
vLLM 0.30.0, RedHatAI's INT4 weights at 16.59 GiB on the GPU, vision tower off, int4 KV pinned at 4.5 GiB, recurrent state in fp16, prefix caching on and speculative decoding off.
Review
Codex reviewed the method and report over 11 rounds. The notes are in the repository.

Limits

Two hosts
The recommended setup and vLLM fp8 ran on different hosts, and fp8 KV prefilled 17 to 18% slower on host 2 than host 1, with no explanation found. Do not read small differences between setups as real.
Not one file
The engines ran different quantizations of the model, and output quality was not measured on our own tasks.
Small tasks
The real pi runs had 4 to 15 tool calls, so they show tool calls and concurrency work, not quality on real work.
Longer sessions
Real pi sessions went no longer than about 12.6k tokens. Sessions near 30k should lower the ceiling to about 4 to 5 agents, which is a projection and not a measurement.
No fairness
vLLM serves first come, first served. One user running 8 agents slowed everyone else, and the light users were not protected.
One architecture
Which engine wins depends on the model's architecture and weight format. On gpt-oss-20b, llama.cpp had the fastest single stream. Test a new model before choosing.
Versions
Engines change quickly, and these are the versions of September 2026.

Sources

Keep reading

All experiments
  • 1.45 GiB

    Q6_K, the smallest of ten GGUF files to pass OpenGrad's tool-use gate

    GGUF, 12 September 2026

    A 2B model in ten GGUF formats on one A100

    Qwen3.5-2B, trained to call tools, saved as ten GGUF files, unquantized BF16 and nine compressed formats: how big and fast each is, how many of its tool-use decisions each keeps, and how much a change of engine and GPU moves the same decisions.

    Arjhine Ty

  • 8.5 GB

    of memory for Qwen3 1.7B at a 32k window before the first prompt, on the 16 GB Pixel; the 12 GB phones stopped it

    OpenWeights, 7 September 2026

    Does the exported window matter?

    A compiled model fixes its context window, how much text it can hold at once, when it is exported, and reserves memory for all of it. Does a larger window also change the answers or the speed? A small matrix, run to decide whether a full sweep was worth it.

    Alpha Romer Coma

  • About 4×

    the median score on IFEval, an instruction-following test, once the reply cap rose to 2048 tokens: 18 to 21 of 30, up from 3 to 6

    OpenWeights, 7 September 2026

    A 640-token reply cap was cutting off the LFM2.5 2.6B

    The model reasons before it answers, so a 640-token cap cut it off. Raising only the cap lifted its scores on every phone. The same day's reruns also tested repeats of one file and a run that had died.

    Alpha Romer Coma