AI Hardware5 min read

Ollama vs llama.cpp vs vLLM: Single-User Simplicity vs Multi-Request Serving

Why Ollama and llama.cpp tie for single users, how OLLAMA_NUM_PARALLEL triggers KV cache CPU spills, why vLLM scales 12x at 32 requests, and Apple's MLX shift.

For a single user on Windows or Linux, Ollama and llama.cpp perform virtually identically (~121 tok/s on 9B RTX 3090) because Ollama wraps llama.cpp. Under multi-agent or team concurrency, vLLM's continuous batching scales up to 1,730 tok/s (9B, 32 users) vs 679 tok/s for tuned llama.cpp, while naive OLLAMA_NUM_PARALLEL pre-allocation can spill models onto CPU RAM.

Key takeaways

  • Do not tune Ollama for heavy multi-user concurrency without guarding total KV cache RAM via OLLAMA_KV_CACHE_TYPE and bounded context.
  • Use llama-server (--fit, --kv-unified, -np) when you need GGUF quantization flexibility and modest 2-to-8 slot concurrency.
  • Switch to vLLM on dedicated Linux CUDA GPUs when serving parallel coding agents, IDE teams, or batch jobs.
  • Run MLX-native weights or Ollama v0.40+ on Apple Silicon Macs to maximize bandwidth and Neural Accelerator prefill.

Quick facts

  • Single-user RTX 3090 Qwen3.5 9B Q4_K_M ties closely: llama.cpp 121.6 tok/s, Ollama 120.6 tok/s, vLLM 115.3 tok/s, LM Studio 109.7 tok/s.
  • Setting OLLAMA_NUM_PARALLEL=4 on a 24 GB card with a 27B model pre-allocates 4 x 32k KV cache (131k tokens), spilling 16% to CPU and cutting total throughput to 33.1 tok/s.
  • llama.cpp v1.0.0 (--fit and --kv-unified) served the same 4-user 27B load inside 24 GB VRAM at 116.4 tok/s.
  • At 32 concurrent requests on RTX 5090 (Qwen3.8 27B), vLLM hits 936 tok/s (2.3s TTFT) vs llama.cpp 369 tok/s and Ollama 74 tok/s (54.1s TTFT).
  • Ollama v0.40 (late 2026) switched Apple Silicon to MLX by default, nearly doubling Qwen3.5-35B-A3B decode from 58 to 112 tok/s.

Choosing the wrong inference server wastes more real-world speed than picking the wrong quantization. Because Ollama, LM Studio, llama.cpp, and vLLM manage KV cache memory, batching queues, and backend kernels completely differently, the fastest single-user engine on your desk can collapse by an order of magnitude the moment four coding agents hit localhost at once.

Chart comparing batch-1 parity against 32-request aggregate throughput across Ollama, llama.cpp, and vLLM on RTX 3090 and RTX 5090
Chart comparing batch-1 parity against 32-request aggregate throughput across Ollama, llama.cpp, and vLLM on RTX 3090 and RTX 5090

Original chart by Ajay Kumar Chaturvedi compiled from SitePoint's November 22, 2026 concurrency benchmark and GPUwerk's November 7, 2026 RTX 5090 serving analysis.

Single User (Batch = 1): Virtually a Tie on PC Hardware

When one person types prompts sequentially on a Windows or Linux workstation, there is almost no hidden magic separating engines because Ollama and LM Studio run llama.cpp engines underneath for GGUF weights.

SitePoint's November 2026 test on a 24 GB RTX 3090 running Qwen3.5 9B Q4_K_M at single concurrency measured:

  • `llama.cpp` v1.0.0: 121.6 tok/s
  • `Ollama` 0.40.15: 120.6 tok/s
  • `vLLM` 0.33.0: 115.3 tok/s
  • `LM Studio`: 109.7 tok/s

If you only run one prompt at a time on a GeForce card, pick whichever tool matches your workflow: Ollama for one-command CLI pulling and service management, LM Studio for GUI exploration, or raw llama-server when you want exact GPU layer/tensor control.

The 4-User Cliff: Why OLLAMA_NUM_PARALLEL Spills to CPU

The tie evaporates the instant you open your local endpoint to four parallel IDE tabs, an automated evaluation harness, or concurrent sub-agents.

Consider what happened when SitePoint tested 4 concurrent users on a 24 GB RTX 3090 running a larger 27B `Q4_K_M` model (~17 GB weights, leaving ~7 GB for KV cache and overhead):

  1. Default `Ollama` (1 slot): Serialized requests cleanly inside VRAM and delivered 39.8 tok/s total.
  2. Tuned `OLLAMA_NUM_PARALLEL=4`: Pre-allocated four static 32K context buffers upfront (4 x 32,768 = 131,072 tokens of reserved KV memory), blowing past 24 GB VRAM, spilling 16% of model layers onto CPU RAM, and dropping aggregate throughput down to 33.1 tok/s!
  3. `llama.cpp` v1.0.0 (`--fit` + `--kv-unified`, 4 slots): Packed KV storage dynamically into one unified cache inside 24 GB without spilling a single layer to PCIe, surging to 116.4 tok/s aggregate.

That harmonic-mean spill trap explains why cranking OLLAMA_NUM_PARALLEL blindly often makes servers slower. If you raise parallel slots in Ollama on tight VRAM, cut context length and quantize the KV cache via OLLAMA_KV_CACHE_TYPE=q8_0 (or q4_0) first, or switch to llama-server.

32 Concurrent Requests: Continuous Batching Takes Over

Scale concurrency up to 32 simultaneous requests (typical of multi-agent loops, team endpoints, or document-extraction pipelines) and vLLM's PagedAttention plus continuous batching pulls into another league. Unlike static-slot engines that wait on full request boundaries or duplicate fragmented KV pages, vLLM packs memory block-by-block and interleaves prefill and decode steps across active tokens dynamically.

Look at the 32-user measurements reported across both SitePoint (Nov 22) and GPUwerk (Nov 7):

  • RTX 3090 (`Qwen3.5 9B`): `vLLM 0.33.0` hits 1,730.0 tok/s (0.6 s time-to-first-token), versus `llama.cpp -np 32` at 679.4 tok/s (2.7 s TTFT) and default 4-slot llama.cpp at 322.9 tok/s (22.5 s TTFT).
  • RTX 5090 (`Qwen3.8 27B`): `vLLM 0.31.0` hits 936 tok/s (2.3 s TTFT), beating `llama.cpp` at 369 tok/s (6.6 s TTFT) and `Ollama 0.35.1` at 74 tok/s (54.1 s TTFT).

Why vLLM Still Isn't a Universal Desktop Default

If vLLM yields up to 12x more throughput under heavy load than Ollama, why doesn't everyone install it on day one? Three friction points keep vLLM squarely in server territory:

  • 90% to 92% VRAM Reservation: By default gpu-memory-utilization grabs nearly all VRAM at boot to manage PagedAttention blocks, leaving almost no room for desktop compositors or creative tools on a shared workstation.
  • Slow Startup & Weight Format: Compiling CUDA graphs adds cold-start lag if you swap five models per afternoon, and vLLM targets FP8, AWQ, GPTQ, or safetensors rather than drop-in community GGUFs.
  • Linux CUDA First: Windows setups rely on WSL2, and non-CUDA ecosystems (AMD gfx1151 or Apple Silicon) historically fall back to llama.cpp or MLX.

The Apple Silicon Twist: Ollama's Shift to MLX

Decision flow routing solo Mac users to MLX or Ollama 0.40+, solo PC users to llama-server, and multi-user CUDA servers to vLLM
Decision flow routing solo Mac users to MLX or Ollama 0.40+, solo PC users to llama-server, and multi-user CUDA servers to vLLM

Original decision diagram by Ajay Kumar Chaturvedi derived from SitePoint (Nov 22, 2026), GPUwerk (Nov 7, 2026), and Bohemian Silicon (Oct 26, 2026).

Apple Silicon follows its own software curve in late 2026. Since Ollama v0.40.0 (late September / October 2026), Ollama migrated Apple Silicon execution from GGUF/llama.cpp onto Apple's MLX framework for supported models. SitePoint notes that single change nearly doubled Qwen3.5-35B-A3B throughput on Mac from 58 to 112 tok/s.

Independent testing on a 256 GB Mac Studio M5 Ultra by Bohemian Silicon (October 26, 2026) reinforces why MLX dominates Macs: MLX reached 9,870 tok/s prompt processing on Qwen3 30B-A3B (more than double llama.cpp's 4,535 tok/s) and 6,538 tok/s on gpt-oss-120b (versus 3,387 tok/s in llama.cpp), tapping Apple's GPU Neural Accelerators far more effectively.

My Verdict: Which Stack I Run Where

I run Ollama (v0.40+ MLX) or `mlx-lm` on Apple Silicon Macs for zero-friction solo work, `llama-server` (`--fit --kv-unified`) on Strix Halo, DGX Spark, and solo Linux/Windows GPUs where I want exact GGUF quant and tensor-split control, and `vLLM` strictly on dedicated Linux CUDA servers whenever four or more agents or teammates hit the endpoint together.

Sources