DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

How to Fix Ollama Out-of-Memory and Slow Inference Errors

Use ollama ps to check CPU/GPU allocation, then reduce context or concurrency before changing hardware. Includes platform-specific GPU troubleshooting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before changing hardware, check where Ollama is placing the model and how much context and concurrency the workload requests. Run ollama ps while the model is loaded: its PROCESSOR field shows whether processing is on the GPU, CPU, or split between them, and the output also reports model size and context. A CPU share can help explain slow inference, but it is a clue—not proof that memory is the only cause.

1. Capture the workload and check actual allocation

Record the Ollama version, model tag, operating system, GPU/backend, context setting, and whether other requests or models are active. Then load the model and run:

As an Amazon Associate I earn from qualifying purchases.

ollama ps

Read the PROCESSOR, SIZE, and CONTEXT values. Ollama documents this output as a way to tell whether a model is on GPU, CPU, or split across both. A split or CPU allocation may account for slower generation; allocation alone does not identify the cause of every slowdown. See Ollama’s FAQ and context-length guide.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Reduce memory demand before changing hardware

Choose a context that fits the task

Context is the maximum number of tokens available to the model in memory. Ollama warns that increasing context requires more memory. Its current documentation, accessed October 4, 2026, lists these default context lengths by available VRAM:

#1 Best Overall
ASUS Dual Radeon RX 9060 XT 16GB GDDR6 Gaming Graphics Card | PCIe 5.0, HDMI 2.1b, DisplayPort 2.1a, 2.5-slot design, Axial-tech Fans, 0dB Technology
  • Axial-tech fans now feature a smaller fan hub that facilitates longer blades and a barrier ring that increases downward air pressure
  • 2.5-slot design allows for greater build compatibility while maintaining cooling performance
  • 0dB technology lets you enjoy light gaming in relative silence
  • Dual BIOS switch lets you toggle between Quiet and Performance BIOS profiles
  • Dual ball fan bearings last up to twice as long as sleeve bearing designs
Available VRAM Ollama documented default context
Below 24 GiB 4k
24–48 GiB 32k
48 GiB or more 256k

These are documented defaults, not guarantees that any particular model will fit. Use a smaller context when memory is tight, provided it still covers the task. Ollama recommends at least 64,000 tokens for tasks such as web search, agents, and coding tools, but that is not a universal troubleshooting setting: raise context only if the machine has enough memory for the model and workload.

Set context in the place you run Ollama

  • Ollama app: adjust the context slider.
  • Server: set OLLAMA_CONTEXT_LENGTH in the server environment.
  • Interactive session: in ollama run, enter /set parameter num_ctx followed by the desired value.
  • API: provide num_ctx in the request’s options.

Use the matching interface for the process that actually serves the model; changing a client setting will not necessarily change a separately configured server. The context guide and FAQ document these controls.

Rank #2
GIGABYTE GeForce RTX 5070 Ti Gaming OC 16G Graphics Card, 16GB 256-bit GDDR7, PCIe 5.0, WINDFORCE Cooling System, GV-N507TGAMING OC-16GD Video Card
  • Powered by the NVIDIA Blackwell architecture and DLSS 4
  • Powered by GeForce RTX 5070 Ti
  • Integrated with 16GB GDDR7 256bit memory interface
  • PCIe 5.0
  • WINDFORCE cooling system

Reduce concurrency and unload models you do not need

Parallel requests can multiply context allocation: Ollama says memory use for parallel processing increases with the number of parallel requests. Under server load, lower OLLAMA_NUM_PARALLEL or reduce the number of concurrently loaded models with OLLAMA_MAX_LOADED_MODELS. Ollama’s FAQ says simultaneous loading and inference depend on available system memory for CPU inference or VRAM for GPU inference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When a model is idle, unload it with ollama stop <model>; API callers can set keep_alive to zero. OLLAMA_MAX_QUEUE controls how many requests wait when the server is busy; it does not add memory for inference or make a model fit. These behaviors and settings are covered in the Ollama FAQ.

Rank #3
GIGABYTE GeForce RTX 5060 WINDFORCE OC 8G Graphics Card, Cooling System, 8GB 128-bit GDDR7, PCIe 5.0, Manufactured by NVIDIA, DisplayPort & HDMI - Video Output Interface, GV-N5060WF2OC-8GD Video Card
  • Powered by the NVIDIA Blackwell architecture and DLSS 4
  • Powered by GeForce RTX 5060
  • Integrated with 8GB GDDR7 128bit memory interface
  • PCIe 5.0
  • WINDFORCE cooling system

Optional advanced cache settings

If your installed version and model support them, Ollama documents automatic Flash Attention when the backend and device support it, a force-on option of OLLAMA_FLASH_ATTENTION=1, and OLLAMA_KV_CACHE_TYPE for the K/V cache when Flash Attention is enabled. The cache type is a global option; the FAQ identifies f16 as its default. These settings are not a substitute for reducing an unnecessarily large context or concurrency, and support depends on the backend and device. Check the current FAQ before changing them.

3. If GPU allocation looks wrong, diagnose detection separately

First distinguish a GPU that Ollama cannot discover from one it detects but cannot use for the full workload. If logs indicate initialization or visibility trouble, inspect them using the relevant platform path in Ollama’s troubleshooting guide:

Rank #4
Sale
GIGABYTE Radeon RX 9070 XT Gaming OC 16G Graphics Card, PCIe 5.0, 16GB GDDR6, GV-R9070XTGAMING OC-16GD Video Card
  • Powered by Radeon RX 9070 XT
  • WINDFORCE Cooling System
  • Hawk Fan
  • Server-grade Thermal Conductive Gel
  • RGB Lighting
  • macOS: ~/.ollama/logs/server.log
  • Linux with systemd: journalctl -u ollama --no-pager --follow --pager-end
  • Docker: docker logs for the Ollama container
  • Windows: logs under %LOCALAPPDATA%Ollama; quit the app and launch it with OLLAMA_DEBUG=1 for more detail.

Linux NVIDIA containers

Test whether Docker can access the GPU with:

docker run --gpus all ubuntu nvidia-smi

If the command fails, the container cannot see the GPU through that setup. Ollama’s troubleshooting guide also recommends checking or reloading the UVM driver, rebooting, and using current NVIDIA drivers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Linux AMD

Check that the user has the required video and render group access and that a container can access /dev/kfd and /dev/dri. For additional diagnostics, Ollama documents OLLAMA_DEBUG=1 and AMD_LOG_LEVEL=3. Its current troubleshooting page warns that AMD discovery timeouts can occur when an older ROCm kernel driver is incompatible with the ROCm 7 libraries bundled by Ollama, and recommends upgrading the driver with AMD’s installation utility. Driver guidance can change; verify it against the current Ollama troubleshooting page and AMD’s instructions for your release.

Best Value
Sale
ASUS Prime Radeon RX 9070 XT 16GB GDDR6 OC Edition Gaming Graphics Card | PCIe 5.0, HDMI/DP 2.1, 2.5-slot, Axial-tech Fans, Dual-ball Fan Bearings, dual BIOS, ASUS GPU Guard
  • Axial-tech fans now feature a smaller fan hub that facilitates longer blades and a barrier ring that increases downward air pressure
  • Phase-change GPU thermal pad helps ensure optimal heat transfer, lowering GPU temperatures for enhanced performance and reliability
  • 2.5-slot design allows for greater build compatibility while maintaining cooling performance
  • Dual-ball fan bearings last up to twice as long as standard conventional sleeve bearings designs
  • 0dB technology lets you enjoy light gaming in relative silence
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

4. Choose a model or hardware only after the checks

If Ollama detects the GPU but ollama ps shows CPU or split allocation, first try a smaller context and reduce concurrent requests or loaded models. Then test a model/configuration that better fits the machine. If GPU memory remains the demonstrated bottleneck and those changes do not meet the task, a GPU with more usable VRAM may help—but there is no source-backed universal VRAM target or single best card for every Ollama model.

Check the selected model’s memory needs and Ollama’s current GPU support documentation before buying or changing a GPU. Compatibility, drivers, model, context, and total concurrent workload all affect whether an upgrade addresses the problem.

Why an OOM may vary by model or Ollama version

Model scheduling has changed. In an announcement dated September 23, 2025, Ollama said its newer scheduler measures exact memory needs rather than relying on prior estimates and reported fewer out-of-memory crashes as a benefit. The announcement says the scheduler was enabled for models implemented in Ollama’s new engine, with more models moving over; it does not establish that every model or version uses it. See Ollama’s scheduling announcement.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

Bestseller No. 1
ASUS Dual Radeon RX 9060 XT 16GB GDDR6 Gaming Graphics Card | PCIe 5.0, HDMI 2.1b, DisplayPort 2.1a, 2.5-slot design, Axial-tech Fans, 0dB Technology
ASUS Dual Radeon RX 9060 XT 16GB GDDR6 Gaming Graphics Card | PCIe 5.0, HDMI 2.1b, DisplayPort 2.1a, 2.5-slot design, Axial-tech Fans, 0dB Technology
0dB technology lets you enjoy light gaming in relative silence; Dual BIOS switch lets you toggle between Quiet and Performance BIOS profiles
$529.00
Bestseller No. 2
GIGABYTE GeForce RTX 5070 Ti Gaming OC 16G Graphics Card, 16GB 256-bit GDDR7, PCIe 5.0, WINDFORCE Cooling System, GV-N507TGAMING OC-16GD Video Card
GIGABYTE GeForce RTX 5070 Ti Gaming OC 16G Graphics Card, 16GB 256-bit GDDR7, PCIe 5.0, WINDFORCE Cooling System, GV-N507TGAMING OC-16GD Video Card
Powered by the NVIDIA Blackwell architecture and DLSS 4; Powered by GeForce RTX 5070 Ti; Integrated with 16GB GDDR7 256bit memory interface
$1,249.99
Bestseller No. 3
GIGABYTE GeForce RTX 5060 WINDFORCE OC 8G Graphics Card, Cooling System, 8GB 128-bit GDDR7, PCIe 5.0, Manufactured by NVIDIA, DisplayPort & HDMI - Video Output Interface, GV-N5060WF2OC-8GD Video Card
GIGABYTE GeForce RTX 5060 WINDFORCE OC 8G Graphics Card, Cooling System, 8GB 128-bit GDDR7, PCIe 5.0, Manufactured by NVIDIA, DisplayPort & HDMI - Video Output Interface, GV-N5060WF2OC-8GD Video Card
Powered by the NVIDIA Blackwell architecture and DLSS 4; Powered by GeForce RTX 5060; Integrated with 8GB GDDR7 128bit memory interface
$495.99
SaleBestseller No. 4
GIGABYTE Radeon RX 9070 XT Gaming OC 16G Graphics Card, PCIe 5.0, 16GB GDDR6, GV-R9070XTGAMING OC-16GD Video Card
GIGABYTE Radeon RX 9070 XT Gaming OC 16G Graphics Card, PCIe 5.0, 16GB GDDR6, GV-R9070XTGAMING OC-16GD Video Card
Powered by Radeon RX 9070 XT; WINDFORCE Cooling System; Hawk Fan; Server-grade Thermal Conductive Gel
$814.28
SaleBestseller No. 5
ASUS Prime Radeon RX 9070 XT 16GB GDDR6 OC Edition Gaming Graphics Card | PCIe 5.0, HDMI/DP 2.1, 2.5-slot, Axial-tech Fans, Dual-ball Fan Bearings, dual BIOS, ASUS GPU Guard
ASUS Prime Radeon RX 9070 XT 16GB GDDR6 OC Edition Gaming Graphics Card | PCIe 5.0, HDMI/DP 2.1, 2.5-slot, Axial-tech Fans, Dual-ball Fan Bearings, dual BIOS, ASUS GPU Guard
0dB technology lets you enjoy light gaming in relative silence; Dual BIOS switch lets you toggle between Quiet and Performance BIOS profiles
$831.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.