Skip to main content
株式会社オブライト
株式会社オブライト

Ollama Not Using Your GPU or Running Slow? Fixes for Windows

, Mac and Linux

Published 2026/11/2614 min read

Ollama slow or ignoring your GPU? Run ollama ps and read PROCESSOR first, then fix VRAM overflow, context length, loaded models, drivers, Docker, AMD and Mac.

When Ollama feels slow or seems not to use your GPU, the fastest check is to run ollama ps and read the PROCESSOR column. 100% GPU means the model runs on the GPU, 100% CPU means the GPU is not being used, and something like 48%/52% CPU/GPU means the model is split between GPU and system memory (as described in the official Ollama FAQ). In most cases the cause is not an undetected GPU but a model plus context that does not fit in VRAM, so part of it sits on the CPU side. This article gives a three-step triage and fixes for Windows, Mac, Linux, Docker and WSL2, limited to what the official documentation confirms.

Three quick checks

- Step 1: run ollama ps and read PROCESSOR. Anything other than 100% GPU means the CPU is involved
- Step 2: confirm the GPU is detected at all. nvidia-smi for NVIDIA, rocminfo for AMD on Linux; Macs use Metal on Apple devices. If the GPU is not detected, look at drivers or container settings
- Step 3: read the server log. GPU discovery results are logged at startup, and OLLAMA_DEBUG=1 adds extra discovery information (per the official troubleshooting guide)

Start with ollama ps: the CPU/GPU split

With a model loaded, run this from another terminal.

ollama run llama3.2 "hello"   # example: load any model with one request
ollama ps

The official FAQ describes three PROCESSOR patterns.

PROCESSOR valueMeaningSpeed
100% GPUThe whole model is in GPU memory (VRAM)Fast (normal)
48%/52% CPU/GPUThe model is split between GPU and system memorySlower; the CPU side becomes the bottleneck
100% CPUThe whole model is in system memorySlowest; GPU not detected, or the model cannot fit in VRAM

This is where the paths diverge. If you see 100% CPU, suspect that the GPU is not detected (drivers, container settings, unsupported GPU). If you see a split such as xx%/yy% CPU/GPU, the GPU is detected but VRAM is short. Driver changes will not fix the latter; you need to reduce memory use with a smaller model, a shorter context, or a quantized KV cache.

Symptom and cause cheat sheet

SymptomLikely causeFix
Split display such as xx%/yy% CPU/GPUModel plus KV cache exceeds VRAMUse a smaller model or lower-bit quantization; shorten the context
Slow only with long inputLarge context inflates the KV cacheLower OLLAMA_CONTEXT_LENGTH; set OLLAMA_KV_CACHE_TYPE
First model slows when a second loadsSeveral models share VRAMOLLAMA_MAX_LOADED_MODELS=1; shorten OLLAMA_KEEP_ALIVE
Sudden slowdown under concurrent requestsLarge OLLAMA_NUM_PARALLEL multiplies contextSet OLLAMA_NUM_PARALLEL=1
100% CPU, GPU not found (NVIDIA)Old driver, unsupported compute capability, CUDA init failureUpdate driver, run nvidia-smi, reload the UVM driver
Falls back to CPU after suspend/resume (Linux)UVM driver state problemsudo rmmod nvidia_uvm && sudo modprobe nvidia_uvm
AMD GPU not usedNo ROCm v7 driver, /dev/kfd permissions, unsupported GPUInstall ROCm v7, video/render groups, Vulkan
GPU unused in Docker--gpus missing, toolkit not configured--gpus=all plus NVIDIA Container Toolkit
Slow in WSL2GPU not visible inside WSLRun nvidia-smi in WSL; consider the native Windows app

Cause 1: VRAM shortage pushes part of the model to the CPU

This is the most common cause. When the model weights plus the KV cache that grows during inference exceed VRAM, Ollama places what does not fit in system memory. Transfers over PCI Express mix with CPU computation, so generation speed typically drops well below the 100% GPU case.

The fix is to reduce memory use. Try these in order.

- Switch to a smaller model: pick a smaller parameter count in the same family (for example 14B to 8B)
- Choose a lower-bit quantization: going from Q8 to Q4 roughly halves the weight size, at some cost in quality
- Lower the context length: see Cause 2
- Quantize the KV cache: OLLAMA_KV_CACHE_TYPE=q8_0 (q4_0 is also available; the default is f16). It applies to all models
- Free VRAM used by other apps: check with nvidia-smi whether browsers, games or video tools hold GPU memory

Where to set environment variables depends on the OS. On Linux with systemd, run systemctl edit ollama.service, add Environment="..." under [Service], then run systemctl daemon-reload and systemctl restart ollama. For the Mac app, set variables with launchctl setenv and restart the app. On Windows, quit Ollama, add a user environment variable in the environment variables editor, and start Ollama again from the Start menu.

# Linux (systemd): add the following via systemctl edit ollama.service
[Service]
Environment="OLLAMA_KV_CACHE_TYPE=q8_0"
Environment="OLLAMA_FLASH_ATTENTION=1"

# Apply
sudo systemctl daemon-reload
sudo systemctl restart ollama
# macOS (app)
launchctl setenv OLLAMA_KV_CACHE_TYPE q8_0
launchctl setenv OLLAMA_FLASH_ATTENTION 1
# then restart the Ollama app

OLLAMA_FLASH_ATTENTION=1 forces Flash Attention on, and 0 turns it off. The effect varies by model, GPU and version, so always re-run ollama ps after changing it and see how the PROCESSOR column moved.

Cause 2: the context length is too large

The official FAQ describes the default context window as 4096 tokens. If an app or client requests a large context, or you raise OLLAMA_CONTEXT_LENGTH, the KV cache grows in proportion and VRAM runs out even when the weights fit. If short prompts are fast but pasting long text makes things slow or split, suspect this.

# Example: set the default context length when starting the server
OLLAMA_CONTEXT_LENGTH=8192 ollama serve

The KV cache can be roughly estimated as 2 x layers x KV heads x head dimension x context length x bytes per element. The formula and a lookup table are in Context Length and VRAM for Local LLMs: KV Cache Formula and Reference Table. By that article's estimate, a 7B-class model (32 layers, 8 KV heads, head dimension 128) at fp16 needs about 1.1 GB at 8K and about 4.3 GB at 32K. To estimate memory for a specific model and quantization, the VRAM calculator can help.

Cause 3: several models are loaded, or parallelism is high

If memory allows, Ollama loads several models at once and keeps them for a set time (OLLAMA_KEEP_ALIVE, 5 minutes by default). For GPU inference, a new model must fit entirely in VRAM to be loaded alongside others; otherwise idle models are unloaded and requests are queued. If you use several models, such as a chat model and an embedding model, they can compete for VRAM and slow things down without you noticing.

- OLLAMA_MAX_LOADED_MODELS: the cap on simultaneously loaded models. The FAQ gives the default as 3 times the number of GPUs, or 3 for CPU inference
- OLLAMA_KEEP_ALIVE: how long models stay in memory. The API keep_alive parameter overrides it
- OLLAMA_NUM_PARALLEL: requests each model handles at once. According to the FAQ, MLX on Metal picks a default based on available memory and other backends default to 1. Parallel requests multiply the context size, so a 2K context with 4 parallel requests needs memory for 8K

# Example for a VRAM-constrained machine: one model, no parallelism
OLLAMA_MAX_LOADED_MODELS=1
OLLAMA_NUM_PARALLEL=1
OLLAMA_KEEP_ALIVE=1m

ollama ps lists every loaded model, so you can also spot a model that is still resident but unused. The FAQ also notes that Windows with Radeon GPUs defaults to one loaded model.

Cause 4: the driver or CUDA is not detected (NVIDIA)

When PROCESSOR shows 100% CPU, first check the NVIDIA driver and GPU support. The official GPU documentation states that NVIDIA needs compute capability 5.0 or higher with driver 550 or newer, and cards from 5.0 through 6.2 need driver 570 or newer. The Windows requirements list NVIDIA driver 551.61 or newer.

Compute capabilityExample cards (as listed officially)
12.0RTX 50 series, RTX PRO Blackwell
8.9RTX 40 series, L4, L40
8.6RTX 30 series, A10, A40
8.0A100, A30
7.5RTX 20 series, GTX 1650 Ti, T4
6.1GTX 10 series, Tesla P40/P4
5.0 to 5.2GTX 9xx, GTX 750/750 Ti and similar
# Is the GPU and driver recognized?
nvidia-smi

# Pick which GPU to use (UUIDs are the reliable form)
nvidia-smi -L
CUDA_VISIBLE_DEVICES=GPU-xxxxxxxx ollama serve

An invalid ID such as -1 in CUDA_VISIBLE_DEVICES forces CPU use. A leftover value from an earlier test can hide your GPU, so check the variable once.

On Linux, Ollama can fall back to the CPU after suspend and resume. The official fix is to reload the UVM driver.

sudo rmmod nvidia_uvm && sudo modprobe nvidia_uvm

If that does not help, check the initialization errors in the log (the troubleshooting guide lists codes such as "3", "46", "100" and "999" as initialization problems), check the UVM driver with sudo nvidia-modprobe -u, reboot, and update the driver. For more diagnostics, set CUDA_ERROR_LEVEL=50 and check the output of sudo dmesg | grep -i nvrm and sudo dmesg | grep -i nvidia.

Cause 5: AMD and other GPUs

For AMD, the official GPU documentation says Linux needs the ROCm v7 driver (installed or upgraded with amdgpu-install), covering Radeon RX, Radeon PRO, Ryzen AI, Instinct and more. Windows needs a ROCm v7 / HIP7-capable driver stack, and the listed cards include the RX 7600 to 7900 series and PRO W7500 to W7900. Additional AMD support comes through Vulkan.

- Group permissions on Linux: access to /dev/kfd requires membership in the video and/or render group. In containers, pass the host group IDs with --group-add
- Old driver: if the log shows "failed to finish discovery before timeout", the driver is probably too old. The guide says to upgrade to the ROCm v7 driver, reboot, and restart Ollama
- Running an unsupported GPU with a close target (Linux): set something like HSA_OVERRIDE_GFX_VERSION="10.3.0" (the official example is the Radeon RX 5400). Unsupported setups carry no guarantee, so treat this as a last resort
- RX 6000 on Windows: RDNA2 / RX 6000 cards may not expose ROCm v7 on current Windows AMD drivers, and the docs recommend Vulkan as the fallback
- Limit which GPU is used: ROCR_VISIBLE_DEVICES (list devices with rocminfo); an invalid ID forces CPU

Vulkan is enabled by default when the backend is installed. On Windows most GPU vendor drivers include Vulkan support; on Linux many distributions need extra components such as Mesa or vendor packages. Reporting VRAM through Vulkan needs root or sudo setcap cap_perfmon+ep /usr/local/bin/ollama; without either, Ollama estimates model sizes. On a mixed integrated/discrete GPU system where an unstable iGPU gets picked, set GGML_VK_VISIBLE_DEVICES to the discrete GPU index. To turn Vulkan off, set OLLAMA_VULKAN=0. We could not find a per-model Intel GPU support table in the official GPU documentation, so for Intel GPUs the practical approach is to check ollama ps and the log on a machine with a working Vulkan driver.

Cause 6: Docker without --gpus

Docker does not pass the host GPU to a container automatically. For NVIDIA, install the NVIDIA Container Toolkit, configure Docker, and start the container with --gpus=all. The official Docker steps are as follows.

# Install the NVIDIA Container Toolkit (apt-based)
sudo apt-get install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

# Start with GPU access
docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

# Check that the container can see the GPU
docker run --gpus all ubuntu nvidia-smi

For AMD, use the rocm tag and pass the devices.

docker run -d --device /dev/kfd --device /dev/dri -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama:rocm

If the GPU works at first and later falls back to the CPU with GPU discovery errors in the log, the troubleshooting guide suggests disabling systemd cgroup management by adding "exec-opts": ["native.cgroupdriver=cgroupfs"] to /etc/docker/daemon.json. Read container logs with docker logs <container-name>.

On a Mac

Ollama supports GPU acceleration on Apple devices through the Metal API (official GPU documentation). Because there is no NVIDIA-style driver to install, the common Mac cases are not "GPU unused" but "does not fit in memory and gets split" or "competes with other apps for memory". Check PROCESSOR with ollama ps, and if it is split, revisit the model, quantization and context length.

# Check the server log
cat ~/.ollama/logs/server.log

# Set an environment variable (app version)
launchctl setenv OLLAMA_CONTEXT_LENGTH 8192
# then restart the Ollama app

The official Docker documentation has no Mac (Metal) instructions. On a Mac, run Ollama as the native app or command rather than inside Docker.

On WSL2

The official Ollama documents we checked (GPU, Windows, troubleshooting) did not contain WSL2-specific setup steps, so we do not state any. Here is only the order of checks.

- Run nvidia-smi inside WSL2 and see whether the GPU is visible. If not, the problem is the WSL-side GPU setup, not Ollama
- If the GPU is visible but ollama ps shows 100% CPU, start Ollama in WSL with OLLAMA_DEBUG=1 and read the GPU discovery output in the log
- The Windows version of Ollama is a native application that includes NVIDIA and AMD Radeon GPU support (official Windows documentation). If you do not need WSL, try the native Windows version and compare

Log locations and OLLAMA_DEBUG

EnvironmentHow to read the log
Maccat ~/.ollama/logs/server.log
Linux (systemd)journalctl -u ollama --no-pager --follow --pager-end (recent: journalctl -e -u ollama)
Windowsexplorer %LOCALAPPDATA%\Ollama (newest is server.log, older ones server-#.log)
Dockerdocker logs <container-name>
Manual runOutput appears in the terminal where you ran ollama serve

To get detailed logs on Windows, quit Ollama from the tray menu and run the following in PowerShell.

$env:OLLAMA_DEBUG="1"
& "ollama app.exe"

Model size versus VRAM: a rough guide

Whether you can run at 100% GPU depends on whether weights, KV cache and runtime headroom fit in VRAM. The lower the quantization bit width, the smaller the weights (Q4 is roughly 0.5 to 0.6 bytes per parameter). The table below is a rough guide and can vary by several GB with architecture and quantization method.

Model sizeQ4 weights (approx.)KV cache at 8K, fp16 (approx.)VRAM with headroom
7 to 8Babout 4 to 5 GBabout 1 GBaround 8 GB or more
14Babout 8 to 9 GBabout 1.3 GBaround 12 GB or more
30B classabout 17 to 20 GBabout 1.6 GBaround 24 GB or more
70B classaround 40 GBabout 2.7 GBaround 48 GB or more (hard on a single GPU)

The KV cache column follows the 8K, fp16 estimates in the KV cache and context length guide. Per-model memory needs are organized in individual articles such as Gemma 4 requirements: VRAM, RAM and GPU reference. If VRAM is short, choosing the largest model that fits fully on the GPU usually feels faster than running a bigger model split across the CPU. For choosing between tools, see Ollama vs LM Studio.

Checklist

- I checked that the PROCESSOR column of ollama ps shows 100% GPU
- For 100% CPU, I checked GPU recognition with nvidia-smi (NVIDIA) or ROCm / Vulkan
- The driver meets the official minimum (for example 550 or newer for NVIDIA)
- For a split display, I considered a smaller model or lower-bit quantization
- I have not set OLLAMA_CONTEXT_LENGTH larger than needed
- I tried OLLAMA_KV_CACHE_TYPE=q8_0 and OLLAMA_FLASH_ATTENTION=1 and confirmed the effect with ollama ps
- OLLAMA_MAX_LOADED_MODELS and OLLAMA_NUM_PARALLEL are not too large for my VRAM
- In Docker, I use --gpus=all (NVIDIA) or the :rocm image with devices
- I restarted the service (or app) after changing environment variables
- When the cause was unclear, I captured logs with OLLAMA_DEBUG=1

ollama ps shows "100% CPU" even though I have a GPU.

The GPU is probably not detected. For NVIDIA, check the driver with nvidia-smi and confirm it meets the official requirement (compute capability 5.0 or higher with driver 550 or newer). For AMD, check the ROCm v7 driver and group permissions; for Docker, check the --gpus flag. The GPU discovery output in the log narrows the cause.

It shows a split such as "48%/52% CPU/GPU". What should I do?

The model and KV cache do not fit in VRAM, so part of them sits in system memory. Reduce memory use with a smaller model or lower-bit quantization, a lower OLLAMA_CONTEXT_LENGTH, OLLAMA_KV_CACHE_TYPE=q8_0, or by freeing GPU memory used by other apps.

I set an environment variable but nothing changed.

When Ollama runs as a service you must set the variable in the right place and restart. On Linux (systemd) use systemctl edit ollama.service, then daemon-reload and restart. On the Mac app use launchctl setenv and restart the app. On Windows quit Ollama, set a user environment variable, and start it again from the Start menu.

It slows down suddenly when several people use it.

Raising OLLAMA_NUM_PARALLEL multiplies the context and therefore the memory needed (the FAQ notes a 2K context with 4 parallel requests becomes 8K). Where VRAM is tight, keep it at 1 or use a smaller model to afford more parallelism.

How can I tell whether a Mac is using the GPU?

Apple devices use Metal for the GPU. As on other systems, 100% GPU in the PROCESSOR column of ollama ps means the whole model is on the GPU (unified memory). A split display means you should revisit the model or context length.

株式会社オブライト

Oflight Inc. is a Tokyo-based IT company providing software development, digital signage, web development, network systems, and IoT/AR/VR technology services.

Feel free to contact us

Contact Us