Why Ollama is slow when your shared server should be fast
When a shared Ollama server feels slow, the cause is usually one of a small set of problems: part of the model running on the CPU instead of the GPU, a context window too large for the memory available, cold model loads that happen after idle periods, parallel requests competing for the same memory, or model files sitting on slow storage. Each of these can be checked in a fixed order, starting with what is actually loaded. This page walks through that order, beginning with ollama ps to see where each model runs, then covering context size, load behavior, concurrency and storage.
Ollama is an MIT-licensed runtime with a llama.cpp backend, available for macOS, Windows, Linux and Docker. Its speed depends on three things you control as the operator: where the model weights and KV cache sit in memory, how many requests share that memory, and where the model files are stored on disk. The model storage location, set by OLLAMA_MODELS, and the concurrency settings, including OLLAMA_NUM_PARALLEL and OLLAMA_MAX_LOADED_MODELS, change how much headroom each user gets. Confirm the current defaults for these variables in the Ollama FAQ for the version you run, since they can change between releases.
Exact speed depends on your hardware, driver stack, model size, quantization and prompt length, so no general throughput figure applies to your server. Measure your own environment before changing settings. Record the load time and generation speed for a representative model and prompt, note what ollama ps reports under load, and repeat the test after each change. That baseline lets you tell whether a fix worked and gives you something concrete to compare when users report slowness again.
How to narrow down a slow response
Start with ollama ps, which shows whether a loaded model sits fully in GPU memory or is split with CPU. If it is split, check whether the context size is too large for the GPU memory you have. If the model is not split, check whether this request triggered a cold load, then look at parallel slots and queueing, and finally at where the model files are stored and how fast that storage reads. Each branch names the one action to take before moving on.
Decision path for narrowing down slow Ollama responses, one check per branch.
Which causes slow Ollama generation
Slow generation on Ollama usually traces back to where the model and its working memory sit: GPU memory, system RAM, or disk. The causes below share one pattern, so check placement first with ollama ps before changing any settings.
Partial CPU offload
When a model does not fit entirely in GPU memory, Ollama places some layers on the CPU, and generation slows sharply as a result. The first check is ollama ps, which shows the share of the model loaded on the CPU and the GPU. A split result means the model is running partly on the CPU, so the fix is a smaller model, a more heavily quantized variant, or more VRAM.
Context length too large for VRAM
The context window consumes memory on top of the model weights, so a large num_ctx setting can push a model that previously fit into CPU offload. Requests with long prompts or big system prompts make this worse. Check ollama ps after a long request, then compare the loaded size with the context you configured. Lowering the context or restricting long requests usually restores full GPU placement.
Cold model loads after unloading
Ollama unloads idle models after a keep-alive period, so the next request pays the cost of reading weights from disk and allocating memory again. The first response after a quiet period is therefore much slower than later ones. Confirm this pattern by timing two consecutive requests. The load duration appears in the API response timing fields, and preloading or a longer keep_alive removes the penalty.
Parallel slots competing for memory
OLLAMA_NUM_PARALLEL and OLLAMA_MAX_LOADED_MODELS both reserve memory, and raising them on a fixed GPU can force models out of VRAM or split them across the CPU. Each parallel slot adds working memory for concurrent requests, so a server that serves several users may slow for everyone. Check the configured values against the memory available, and confirm the effect with ollama ps while the server is under load.
- Default parallel requests
- 1
Slow or network storage for models
Model files are read from disk when they load, so OLLAMA_MODELS pointed at a slow disk, an overloaded network share or a remote mount lengthens every cold start. Storage latency and throughput affect load time, not steady generation speed. Check where the variable points, measure read throughput on that path, and move models to local fast storage when cold loads are the complaint.
CPU-only hosts
Without a supported GPU, Ollama runs the whole model on the CPU, and token generation speed depends on core count, memory bandwidth and model size. Small quantized models can be acceptable, while larger models will feel slow to users. Confirm GPU detection in the logs and in ollama ps before tuning other settings, because a missing GPU explains most slow results on a new server.
How to diagnose a slow model step by step
This sequence narrows a slow Ollama response to one cause by checking the version, the processor split, a repeatable timing baseline and one changed variable at a time, so the fix targets evidence rather than guesses.
Confirm the model and server version
Record the Ollama version the server is running, the exact model name and tag, and the quantization shown by the model listing. Someone with shell access to the server does this, and the same machine should be used for every later test. The step is done when you have a written record of the version, the model tag and the host it runs on, so any later change can be traced to a known starting point. Check the version against the release notes before assuming a bug is involved.
Read the processor split with ollama ps
Load the model with a short test request, then run
ollama pson the server. The output shows each loaded model, its size, and a PROCESSOR column that reports whether the model sits fully on the GPU or is split between GPU and CPU. A partial CPU share is the most common reason for slow generation. The step is done when you have recorded the split for the model and the context length in use. If the split is not 100 percent GPU, move to the next step with that finding in hand.Reproduce with a fixed prompt and read timings
Send the same prompt, with the same options and a fixed seed, through the API on the server. Use a non-streaming request so the response contains the timing fields. Run the request once to warm the model, then run it again and keep both results. The step is done when you have a baseline with load duration, prompt evaluation time and generation time recorded side by side. Those fields are explained in the usage monitoring topic, so use that guidance to interpret them.
Change the context length alone
Set a single new context length, reload the model, and repeat the fixed prompt. Confirm the change took effect with
ollama ps, which should show a different memory footprint and possibly a different processor split. Compare timings with the baseline. The step is done when the result is recorded with only the context value changed. A larger context usually needs more memory, so a split that appears at higher context points to memory pressure as the cause.Change the parallel count alone
Restore the context value from the baseline, then change only the number of parallel requests the server allows per model. Reload the model and run the fixed prompt again, first alone and then with the concurrent load you expect in production. Check
ollama psfor any change in the processor split. The step is done when you have one timing result per parallel setting. Higher parallel counts multiply the memory each loaded model needs, so a split that appears only under this change points to competing slots.Change the keep-alive setting alone
Reset context and parallel values to the baseline, then change only the keep-alive value, which controls how long a model stays in memory after its last request. Measure the first response after an idle gap, once with the default and once with the longer value. Compare load duration in each run. The step is done when the cold-load and warm-load timings are recorded separately. A large gap between the two confirms that cold loads, not generation, account for the slow first response.
Record the results and check storage
Write one table that lists each test, the single variable changed, the processor split, the load duration and the generation time. If load times stay high across warm runs, check where the model files sit and whether that storage is local and fast enough, since the model directory is set by the OLLAMA_MODELS variable. The step is done when the table identifies one cause or states clearly that the evidence points to storage or hardware. Keep the table with the change record so the fix can be repeated and reviewed.
Settings that change Ollama response speed
This table compares the server and request settings that change how much memory a model occupies, how long it stays loaded and how many requests share it. Read each row against the symptom you see in ollama ps and in response timings, then confirm the default values for your installed version, because the FAQ defaults can change between releases.
| Setting | What it controls | When it fits | Speed trade-off |
|---|---|---|---|
| OLLAMA_NUM_PARALLEL | Parallel requests served per model (default 1 per the Ollama FAQ) | Several users share one model and requests queue behind each other | Each parallel slot reserves extra memory for context, so raising it can push a model into partial CPU offload |
| OLLAMA_MAX_LOADED_MODELS | How many models stay in memory at once (default 3 times GPU count, or 3 on CPU, per the FAQ) | Several models are called in rotation and reloads keep appearing | Loading more models at once competes for VRAM, so the GPU may split layers between GPU and CPU |
| OLLAMA_MODELS | Directory where model files are stored (defaults differ by platform, as listed in the FAQ) | Model files sit on a network share, slow disk or a volume with little free space | Slow storage lengthens every cold load, so place the directory on fast local storage you control |
| OLLAMA_KEEP_ALIVE | Server-wide time a model stays loaded after its last request | Users see a long first response after idle periods | Longer retention keeps memory occupied for other workloads, while shorter retention adds cold-load delay |
| keep_alive (per request) | Overrides the retention time for a single API call | One workflow needs a model warm while others can release it | Setting it to zero on every call forces reloads, which shows up as high load time in responses |
| Context length (num_ctx) | Tokens the model can hold in one request, including prompt and output | Long documents or chat histories are sent with each call | A larger context grows the memory footprint, so a model that fit before may offload layers to CPU |
| Model size and quantization | Memory the weights need before any context is added | A model is too large for the GPU memory you have | A smaller quantization or model usually fits fully on the GPU, but confirm quality for your use case |
| Hardware and GPU detection | Whether Ollama uses the GPU at all | ollama ps shows CPU processing where you expected GPU | Without GPU detection, every request runs on CPU regardless of other settings |
How CPU offload slows down generation
When a model does not fit entirely in GPU memory, Ollama places some of its layers on the GPU and runs the rest on the CPU. Each generated token requires a pass through every layer, so the slower CPU layers set the pace for the whole response. The GPU finishes its share quickly, then waits for the CPU, and that handoff repeats for each token. The result is often a dramatic drop in tokens per second compared with a model that sits fully in VRAM, even when only a fraction of the layers are on the CPU. Treat any split as a performance problem to fix, not a normal operating state for interactive use.
Run ollama ps after a model has loaded and read the PROCESSOR column. A value of 100% GPU means the model is fully resident in VRAM. A value such as 48%/52% CPU/GPU means the model is split, and the percentages describe how the loaded model is divided between the two. Check this column after every change to model size, context length or concurrency settings, because the split can shift without any change to the model itself. A model may still load in a split state because Ollama can use system memory for the portion that does not fit, so a successful load does not confirm good performance. Before you blame the model or the server, confirm the GPU is detected at all, since a missing GPU makes every model run on the CPU. The GPU detection troubleshooting topic covers that check.
Compare the observed split against your hardware sizing before you tune anything. Work out how much VRAM the model weights need, then add the memory for the context window and for any parallel requests, and see whether the total fits on the cards you have. If it does not, the options are a smaller or more heavily quantized model, fewer parallel slots, a shorter context, or more GPU memory, and each choice has a quality, capacity or cost trade-off that the sizing topic explains. Also confirm which GPUs the server exposes to Ollama, because a multi-GPU host that uses only one card will show a split even when the total memory looks sufficient. Record the PROCESSOR value under realistic load so the next capacity review starts from a measured baseline.
Questions buyers ask about slow Ollama performance
Does fixing a slow Ollama server cost money?
Running Ollama itself is free on your own hardware. The Ollama pricing page states that running models on your own hardware is always unlimited, and the project is MIT licensed. The costs of fixing slowness are labor and, sometimes, hardware. Labor covers diagnosis, configuration changes, testing and documentation, and it is usually a one-time cost unless you add ongoing support. Hardware costs recur only if you buy more GPUs, memory or faster storage. Ask any partner for a quote built from a written scope that names the hosts, the diagnostic steps and the deliverables.
How long does it take to diagnose a slow Ollama server?
The duration depends on how many hosts are involved, whether logs are already collected, and whether the problem reproduces on demand. A single workstation with a clear symptom is much quicker to examine than a shared server with several models, users and GPUs. Diagnosis moves faster when you can supply a repeatable test prompt, the model names and the time of day the slowdown occurs. No fixed duration applies to every server, so ask for the timeline in the written scope.
Can our internal team find out why Ollama is slow?
Often, yes. The main checks are simple: run ollama ps while a request is in progress and read the PROCESSOR column to see whether the model is split between GPU and CPU, compare the model size with available VRAM, and note whether slowness happens only on the first request after idle time. Engineers who know Linux services, GPU drivers and container settings can usually work through these checks. Teams without that experience, or with multi-GPU servers and strict change control, tend to benefit from outside help.
What do we need to provide for a performance review?
Plan to provide access to the affected hosts or a reproduction environment, the Ollama service logs and any enabled debug output, the models and context sizes in use, and a sample workload that matches real requests. Also provide the server configuration, including values such as OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_KEEP_ALIVE, and the location of model files through OLLAMA_MODELS. Confirm with your security team how access will be granted and recorded before the work starts.
Is a hardware upgrade always needed to make Ollama faster?
No. Many slowdowns come from configuration, not hardware. The most common causes are a model that does not fit in VRAM and spills onto the CPU, a context window set larger than the hardware can hold, parallel slots that compete for memory, cold model loads after the model unloads, and model files stored on slow disks. Changing the model size, quantization, context length or keep-alive settings can help without new equipment. Hardware is the right answer when the workload itself needs more memory than the server has after tuning.
Do we need a partner to fix Ollama performance problems?
You may not need one, but outside help is worth considering in specific situations: the slowdown affects production users and your team cannot reproduce it, several GPUs or hosts are involved, the server must pass a security or compliance review, or the fix requires driver or container changes your team cannot schedule. A partner can also document the findings so the next incident is easier to resolve. DeployOpen works on fixed-scope engagements, and ongoing support is available as a retainer for shared servers that need continued attention.
Will changing Ollama versions fix slow responses?
Sometimes, but a version change should be tested rather than applied on assumption. Ollama ships frequent releases, and behavior can change between versions, so a controlled test against the same workload is the safer approach. Record the current version, test the target version on a copy of the environment, compare load and generation timings, and keep a rollback path. Your change process should cover this before any production server is updated.
Operational risks when tuning a shared server
Settings that speed up one workload can slow or break every other user of a shared Ollama server. The four risks below connect because each change touches memory, model availability, file paths or logs that other people depend on. The local API has no authentication by default, so run any tuning change in a controlled window with a rollback plan.
Raising parallel slots adds memory pressure
Setting OLLAMA_NUM_PARALLEL above its default of 1 lets one model serve more requests at once, but each slot needs memory for its own context. On a GPU, that extra demand can push a model partly into CPU memory and slow every user, including those who were not asking for more throughput. Before raising the value, check ollama ps under realistic peak load and confirm the model still fits in VRAM at the context length your users send.
Unloading models disrupts active users
Stopping a model with ollama stop, or lowering keep_alive so models unload sooner, forces the next request to reload weights from disk. Users in the middle of a session see a long pause that looks like a fault, and a busy server can end up cycling models in and out of memory. Announce the window, confirm who is calling the model, and measure the cold load time before and after the change.
Moving OLLAMA_MODELS can break access
Pointing OLLAMA_MODELS at a new directory changes where Ollama looks for model files, and the service account must be able to read and write there. A path that is missing, on a slow or network mount, or owned by the wrong user can make models appear absent or fail to load. Copy the existing store first, set ownership and permissions for the service user, restart, and confirm with a test request before removing the old copy.
Performance logs can expose prompts
Debug output and request logs help explain slow responses, but verbose logging can capture prompt content, user identifiers and model names that should stay private. Logs shared in tickets, chat channels or vendor issues can leak that data to people who should not see it. Review what the log contains before sharing, redact prompt text and identifiers, and turn debug output off again once the investigation ends.
When a slow Ollama server needs outside help
Bring in an implementation partner when a slow Ollama server keeps coming back after the obvious fixes. Repeated slowness after configuration changes is the clearest signal. If your team has already checked ollama ps for partial CPU offload, shortened the context window, and confirmed that models stay resident, but responses still degrade after each change to OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS or keep-alive settings, the problem is usually an interaction between settings, model size, VRAM and host layout. A partner can reproduce the load on a staging host, record which combination of settings produces the slowdown, and hand back a configuration with the reasoning written down so the next change does not start the cycle again.
A second signal is a host that mixes GPU and CPU work. When some models run fully on GPU, others split across GPU and system memory, and requests from different users land on different models, the server's behavior becomes hard to predict from the outside. Mixed hosts also raise questions about driver versions, container GPU access and the storage holding model files, which the sibling troubleshooting sections address one at a time. Ask a partner to map each model to its memory footprint, measure first-token and generation time under realistic concurrency, and recommend whether to add capacity, split workloads across hosts or place a gateway in front. Confirm the scope in writing, including which hardware, operating system and Ollama version are covered and whether the partner needs administrative access to the hosts.
The third signal is evidence. When a security or compliance review asks how a shared server is sized, how load is controlled and what happens under pressure, a documented performance baseline is often required. DeployOpen can scope work that tests the server under defined load, records load time and generation time per model, reviews the access and network settings that affect capacity, and delivers the results as a written report with the configuration in version control. DeployOpen does not issue audit reports or certifications. Independent auditors and certification bodies make those determinations, so ask what evidence your reviewers will accept before work starts. Pricing follows from the written scope, so describe your hardware, user count and review deadline when you request a quote.
How DeployOpen works on this
DeployOpen starts from the measured cause of slow generation on your Ollama server, not from a guess about hardware. We scope the work in writing, check how models are loaded, sized and stored in your infrastructure, and hand over settings and documentation your team can repeat. Engagements are fixed-scope, with ongoing support available as a retainer.
How we scope
- Review which models, context lengths and request patterns users actually send to the server
- Capture current output of ollama ps and server logs from the host or container
- Agree in writing which hosts, GPUs, model directories and access paths are in scope
How we build
- Test partial CPU offload by comparing model size and context against available VRAM
- Measure cold load time against keep_alive settings and preloading behavior on your server
- Check OLLAMA_NUM_PARALLEL and OLLAMA_MAX_LOADED_MODELS against memory actually available
How we hand over
- Deliver the tuned configuration, with each changed variable and the reason for the change
- Document a repeatable check sequence using ollama ps, logs and timing fields in responses
- Walk your operators through the findings and confirm each fix with a before and after run
How we support
- Offer ongoing support and upgrades as a retainer after the fixed-scope engagement ends
- Retest performance after Ollama version upgrades or changes to models and hardware
- Confirm with your team which metrics and alerts they want kept after handover

