VRAMNeeded Calculator

Fix Ollama "model requires more system memory"

Ollama shows this when it checks memory before loading a model and decides there isn't enough. Examples from real GitHub issues:

Error: 500 Internal Server Error: model requires more system memory (9.7 GiB) than is available (8.1 GiB)
{"error":"model requires more system memory (10.1 GiB) than is available (4.1 GiB)"}

(From ollama issue #15650 and #7423.)

What it means

"System memory" is RAM (plus swap), not VRAM. Ollama needs RAM for any part of the model that doesn't fit on the GPU, and for the whole model if you have no supported GPU. The required figure includes the weights and the KV cache for every parallel slot.

Fixes, in order

1. Set OLLAMA_NUM_PARALLEL=1

In issue #7423, a contributor explained that Ollama was using a default of 4 parallel slots. With an 8K context from the Continue plugin, that meant 32K of context and a 4.0 GiB KV cache. Setting OLLAMA_NUM_PARALLEL=1 would cut that to about 1 GiB. Requests still work one at a time.

2. Use a smaller context

Lower OLLAMA_CONTEXT_LENGTH, or num_ctx in your Modelfile, API call or app (Continue, Open WebUI and others set their own). The KV cache grows with context.

3. Update Ollama if you run it in Docker or LXC

Several issues (#11497, #15704, #15650) report the error while free -h shows plenty of available RAM. In containers, Ollama counted reclaimable page cache as used memory. PR #13782 changed the calculation to the LXCFS formula, and a maintainer linked it as the fix for #15650. On a host, also check whether something like ZFS ARC is holding RAM (one user in #11497 fixed it by capping ARC).

4. Free RAM or add swap

Close browsers and other large processes. Ollama counts free swap too.

5. Pick a smaller model or quant

A smaller tag (for example 3B instead of 7B), or a Q4 quant instead of Q8. Check sizes in the VRAM calculator and What can I run?.

ollama ps shows how much of a loaded model sits on CPU vs GPU.

Sources

Last checked: