RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
Glossary / Transformer & LLM components / PagedAttention
Transformer & LLM components

PagedAttention

PagedAttention is the memory layout introduced by vLLM that stores the KV cache in fixed-size blocks (pages), like virtual memory. Each request keeps a page table mapping logical positions to physical blocks; blocks can be shared across requests with identical prefixes.

The win: eliminates the internal fragmentation that wastes 60–80% of KV cache memory in naive contiguous allocations. PagedAttention lets vLLM pack 2–4× more concurrent requests into the same VRAM.

A side benefit: trivial prefix caching — multiple requests sharing a system prompt point at the same physical block, so the prefill cost is paid once.

Practical example

A team serving a shared local LLM behind vLLM sees a naive server choke: with 32 concurrent chat sessions each holding a growing KV cache in a contiguous block, memory fragments badly, and VRAM runs out well before the GPU's true capacity is reached, capping concurrency far lower than the hardware should allow. Switching to a runtime that implements PagedAttention — vLLM's default — fixes this by allocating KV cache in fixed-size pages instead of one contiguous block per request, eliminating that fragmentation and roughly doubling or better the number of concurrent sessions the same 48 GB card can hold. A bonus shows up immediately: all 32 sessions share the same system prompt, so their KV cache pages for that shared prefix physically overlap, meaning prefill for the system prompt is computed once instead of 32 times.

Related terms

KV CachePrefix CachingContinuous Batching

See also

tool: vllm

Reviewed by Eruo Fredoline. See our editorial policy.

Buyer guides
  • Best GPU for local AI →
  • Best laptop for local AI →
  • Best Mac for local AI →
When it doesn't work
  • CUDA out of memory →
  • Ollama running slowly →
  • ROCm not detected →