Multi-GPU servers for Ollama

Ollama can spread a model across several GPUs or keep models on separate cards, but splitting a model often costs throughput. This page explains how placement, concurrency settings and VRAM headroom decide what loads and how fast it responds.

On this page

Multi-GPU servers for Ollama: when one server needs more than one card

A shared Ollama server needs more than one GPU when your team wants several models loaded at once or more simultaneous requests than one card can serve. Ollama can spread work across multiple GPUs, but the defaults decide how much of that capacity you actually get, so check them before you buy hardware. The two settings that matter first are OLLAMA_MAX_LOADED_MODELS, which the Ollama FAQ documents as defaulting to 3 times the number of GPUs (or 3 on CPU), and OLLAMA_NUM_PARALLEL, which defaults to 1 parallel request per model.

Ollama's documentation describes a runtime that loads models into the memory of the GPUs it detects and can place a single model across more than one card when it does not fit on one. The FAQ also covers the concurrency controls, so you can see how many models can stay resident and how many requests each loaded model serves at once. Because OLLAMA_NUM_PARALLEL is 1 by default, adding a second GPU does not by itself increase request concurrency for a model. Teams usually need multi-GPU work in two situations: a model is too large for one card, or several models must stay loaded for different applications without reloading between requests.

Before you change any value, confirm the current behavior against the version you run, since the FAQ and Ollama GitHub releases change over time. Record how many GPUs ollama ps reports for each loaded model, and test whether your planned models load together in your VRAM budget. Those checks tell you whether you need a second card, a higher parallel setting or a separate server.

Multi-GPU configuration options and when each fits

This table compares the four settings that decide how Ollama uses several GPUs: GPU selection, loaded model count, parallel requests and queue depth. Read each row against the workload you plan to host, since the right choice depends on whether one large model spans cards or several models stay resident at once.

SettingDocumented default and what it controlsFits when
CUDA_VISIBLE_DEVICESNo default value supplied. Selects which GPUs the Ollama process can see. Confirm the exact GPU selection variable and its behavior for your platform in the Ollama docs before relying on it.You want to dedicate specific cards to one Ollama instance or keep other workloads off them.
OLLAMA_MAX_LOADED_MODELSDefaults to 3 times the number of GPUs, or 3 on CPU. Sets how many models can stay loaded at once.Several different models must stay resident so requests to each avoid reload delays, and VRAM can hold them together.
OLLAMA_NUM_PARALLELDefaults to 1 parallel request per model. Sets how many requests a loaded model serves at once, and each slot adds memory use.Many users share one model and you have spare VRAM for extra context per slot. Raise it only after checking memory headroom.
OLLAMA_MAX_QUEUEDefaults to 512 queued requests. Sets how many requests wait when all slots are busy.Bursty traffic should queue rather than fail, but a very deep queue can hide overload from users. Confirm the overload behavior you want.
One large model split across GPUsOllama spreads one model's layers over available cards. Cross-GPU transfers can reduce throughput compared with a model that fits on one card.The model cannot fit on a single GPU and you accept lower speed for capacity. Test throughput on your own hardware.
Separate models pinned to separate GPUsEach GPU or GPU group hosts its own model, so loads do not compete for the same VRAM.Different teams or applications use different models and predictable latency matters more than maximum model size.

Splitting one model or dedicating GPUs to different models

When a model is too large for any single card, Ollama can place its layers across several GPUs so that one model uses the combined memory. Each token then passes through the cards in sequence, so the cards cooperate on one request path. This layout suits a single large model serving a modest number of users, where fitting the model matters more than response speed.

  • Loading: the weights and KV cache are divided across the GPUs at load time, and that layout stays fixed until the model is unloaded.
  • Where throughput is lost: cards wait on one another during each forward pass, and data moving between cards adds latency when no fast interconnect links them.
  • Concurrency: every request uses the same split placement, so parallel slots set by OLLAMA_NUM_PARALLEL share one model's compute and queue depth grows quickly under load.
  • Best fit: an internal assistant or evaluation workload built on one large model that cannot fit on a single card.

Before choosing this layout, confirm how many cards each model spans in your Ollama release and measure throughput at your expected concurrency on your own hardware.

How to size VRAM so concurrent models can load

Start by adding up the memory each loaded model needs, not the memory of the largest model alone. For each model you plan to keep resident, total the weights at its quantization, the KV cache for the context length you will allow, and the extra per-request memory that appears once parallel slots are in use. Ollama's OLLAMA_NUM_PARALLEL setting multiplies the context memory, so a model that runs comfortably with one request can grow when several users hit it at once. Sum these figures across every model that must be resident at the same time, then compare the total against the usable VRAM on each GPU, keeping headroom for the CUDA or ROCm runtime and for the next request. Confirm the exact per-slot cost for your model and context setting in your own environment with ollama ps and the server logs, because the estimate is only a planning figure until you observe it.

A model that fits on paper can still fail to load because memory is not one shared pool. Ollama places a model's layers across the GPUs it chooses, and a model split across cards still needs each card to hold its share plus its portion of the cache. Fragmentation, a second model already occupying one GPU, or a display or other process using VRAM can leave no single card with enough space for the next layer set, even when the sum of free memory looks sufficient. Check free memory per device after each model loads, not only at idle, and test the combination you actually plan to run under concurrent load.

Loaded-model limits and the request queue interact with memory headroom. OLLAMA_MAX_LOADED_MODELS caps how many models stay in memory, and when a new model is requested beyond that cap, Ollama must unload one before loading another, which adds latency and can look like a failure to users. Requests that cannot start wait in the queue controlled by OLLAMA_MAX_QUEUE, so memory pressure shows up as growing wait times before it shows up as errors. Decide the number of resident models first, then set parallelism so the cache for all slots fits, and treat the queue as a signal rather than a buffer. For deeper estimates, use the sibling topics on VRAM, model size and context length, and on sizing a server for concurrent users, which cover the per-model arithmetic and the concurrency defaults.

Configuring a multi-GPU Ollama server step by step

This sequence takes a host from raw GPU hardware to a multi-GPU Ollama server where each model's placement, concurrency and queue limits are set on purpose and confirmed before users arrive. Each step closes with a check that tells you whether to move on.

  1. Confirm the GPUs are detected and supported

    Before touching Ollama settings, the platform engineer checks that the operating system sees every GPU with the vendor's own tools, such as nvidia-smi on NVIDIA hosts or the ROCm tools on AMD hosts, and that the driver version and card families appear in Ollama's support documentation. Start the server in the foreground and read its startup log for lines naming each detected GPU and its memory. Done means every installed card is listed with the expected VRAM. If a card is missing, stop here, because later steps cannot fix a detection problem. Confirm the driver and card details against the current Ollama documentation rather than from memory.

  2. Set GPU visibility and dedicated assignments

    Decide which GPUs serve which workload, then restrict the Ollama service to those devices using the GPU visibility variable for your vendor, such as CUDA_VISIBLE_DEVICES for NVIDIA cards, set in the service's environment file or unit file rather than in a shell session. Record the device index and UUID for each card so the mapping survives reboots. Done means a restart of the service reports only the intended GPUs in the log, and nothing else on the host is claimed by the server.

  3. Set the loaded model ceiling

    Set OLLAMA_MAX_LOADED_MODELS to the number of models you intend to keep resident at once. The default depends on GPU count, so do not rely on it for a shared server. Count the models per GPU using the memory figures from your VRAM estimate, leaving headroom for context and KV cache growth. Done means that when you load the planned models in sequence, each one fits on a GPU without evicting another, and the ceiling matches your plan. If a model unloads unexpectedly, lower the ceiling or move a model to another GPU before raising it again.

  4. Set parallelism and queue depth deliberately

    Set OLLAMA_NUM_PARALLEL for the number of simultaneous requests each model should serve. The documented default is 1 per model, and raising it increases memory use for each model because every slot needs its own context. Then set OLLAMA_MAX_QUEUE, whose documented default is 512 queued requests, to a value your users and gateway can tolerate. Document the chosen values with the reason for each. Done means a restart applies all three limits, and the service log reflects the new settings without errors about memory allocation.

  5. Bind the server only after access controls are planned

    Ollama listens on 127.0.0.1 port 11434 by default. Keep that binding while you test. Before you change OLLAMA_HOST to expose the API on a network interface, put a reviewed access layer in front of it, because the local API does not require authentication. Planning for that layer is covered in the security section of this pillar. Done means the server is still reachable only from the host during load testing, and the access design is approved for the moment the bind address changes.

  6. Load test each model in isolation

    Load each planned model alone and send representative prompts at your target context length. Watch GPU memory on each card with the vendor tool while the model is resident. Then repeat with the other models loaded together to confirm they co-reside as planned. Done means each model runs entirely on its assigned GPU, responses return without falling back to CPU, and memory use stays below the card's total with margin for growth during longer conversations. Record the observed figures so the next capacity review starts from measurements.

  7. Verify placement with ollama ps and the logs

    Run ollama ps while the models are loaded and confirm the processor column reports GPU use for each model and that the set of loaded models matches your plan. Cross-check the server log for offload or device messages that name the GPU each model landed on, and compare them against the vendor tool's per-process memory view. Done means every model appears on the intended device, none shows a CPU split, and the log has no repeated load or unload cycles during a steady test. Repeat this check after each configuration change and after every upgrade.

Where multi-GPU setups lose throughput or fail

A multi-GPU Ollama server can be slower or less stable than a single card in ways that are easy to miss at first. The risks below share one cause: the model, the parallel slots and the queue compete for the same VRAM and the same PCIe paths. Check each one against your own hardware and workload before you size the server or open it to users.

Cross-GPU traffic slows a split model

When one model is spread across several cards, each token generated has to pass intermediate results between GPUs. On hosts without fast direct links, that traffic runs over the PCIe bus and can cost more time than the extra VRAM gains. The symptom is a model that fits and loads but generates more slowly than a single-card run of a smaller model. Check throughput for the same prompt with the model pinned to one GPU and then split, using ollama ps to confirm how the model is placed.

Uneven VRAM use across cards

Layers and the KV cache do not always divide evenly, so one card can fill while another sits partly empty. The operator sees an out-of-memory error or CPU offload even though the total free VRAM looks sufficient. Check per-card memory during a load test with nvidia-smi or rocm-smi, and compare it with the placement Ollama reports. Confirm how your Ollama version balances layers before you assume total VRAM is usable.

Model evicted under load

Ollama keeps several models resident at once, and it unloads one when a new model needs the memory. A model that a team relies on can drop out of memory during a busy period, so the next request waits for a full reload. The symptom is intermittent latency spikes that line up with requests for other models. Check the loaded-model limit against your planned model set and review the server logs for unload events during peak use.

Requests stuck in the queue

When all parallel slots are busy, new requests wait in a queue, and the queue has a fixed maximum length. Once it is full, clients receive errors rather than slower answers. The operator sees client timeouts that look like network faults but appear only under concurrency. Check the configured queue limit against expected burst size, and confirm how your clients handle a rejected request before you rely on the default.

Driver and GPU detection mismatches

A server can start with only some of its GPUs visible, for example after a driver update, a kernel change or a container that does not pass every device through. Ollama then runs on fewer cards than the hardware plan assumed, and the model may fall back to CPU. The symptom is slower generation and a lower VRAM total than expected. Check the GPU list in the startup logs and in ollama ps after every driver or container change, and confirm your driver matches the support table for your GPU family.

Overcommitting memory for parallel slots

Each parallel request reserves memory for its own context, so raising the parallel count can consume the VRAM that the model needs. A server sized for one request at a time may fail when concurrency rises, even though the model alone loads. Check memory use at the parallel count you plan to run, with the largest context your users send, and leave headroom for that growth before you increase the setting.

How requests reach GPUs and models

The diagram starts at a client request arriving at the Ollama server on its API port. The server checks whether the requested model is already loaded and whether a parallel slot is free for it. If a slot is available, the model runs on one or more GPUs; if not, the request waits in a queue. Check loaded models, parallel slots and queue depth together, because a model split across GPUs and a model that waits in line both show up as slow responses.

Request path through the Ollama server, model loading, parallel slots and GPU placement.

Security and operations for a shared multi-GPU server

A shared multi-GPU Ollama server carries three operational risks: an API that accepts requests without authentication, cloud features that send traffic outside the server, and placement changes that follow driver and version updates. The cards below cover the controls to decide before users arrive and the signals to watch once the server is running.

No authentication on the local API

The local Ollama API listens on 127.0.0.1 port 11434 by default and does not require authentication. Anyone who can reach that port can load models, run prompts and consume GPU memory. Changing the bind address with OLLAMA_HOST to serve other machines makes that exposure real, so put access control in front of it, such as a reverse proxy with authentication, network segmentation or both. Confirm which clients reach the port and test that unauthenticated requests from other hosts are refused.

Ollama FAQ

Proxy as the only entry point

When the server is exposed through Nginx or another proxy, the proxy becomes the control point for identity, rate limits and request logging. Make sure the Ollama port itself is not reachable from user networks, since a proxy that is bypassed leaves the API open. Review which paths the proxy forwards, and confirm that browser-originated requests are handled deliberately rather than allowed by default.

Ollama FAQ

Disable cloud features

Cloud features send requests beyond your server, and direct cloud inference uses API keys sent as Bearer tokens. Set OLLAMA_NO_CLOUD=1 in the service environment or the server configuration file if the server must keep all inference local. Then verify the setting took effect by checking the service environment after a restart, and confirm that your security team has approved any cloud use that remains.

API authentication docs

Track driver and version changes

GPU driver updates and Ollama releases can change how models are placed across GPUs, which affects memory headroom and latency for every user. Record the Ollama version and driver version in your change log, and read release notes before upgrading. Recent releases include v0.40.5 (14 October 2026) and a pre-release, v0.40.6 (16 October 2026). Test placement with your own models on a staging host before rolling changes to production.

Ollama releases

Logs and capacity monitoring

Watch the server logs for model load failures, GPU detection messages and CPU fallback, since these signal that a model is not running where you planned. Track loaded models, queue depth and GPU memory over time, and compare them with the limits set by OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE. Alert on sustained queueing so you can decide whether to add capacity or adjust concurrency before users notice delays.

Default queued requests
512

Questions teams ask about multi-GPU Ollama servers

Does running Ollama on our own GPUs cost money?

Running models on your own hardware is free of license fees. Ollama's pricing page states that running models on your own hardware is always unlimited, and its paid plans cover cloud models rather than local inference. Your real costs are the GPUs, power, cooling, rack space, storage and the staff time to install, patch and monitor the server. Those costs recur or scale with hardware count, so ask any partner to separate one-time hardware and setup work from ongoing operations in the quote. Confirm current terms on the Ollama pricing page before you finalize a budget.

Can one model span two GPUs, and what does it cost in speed?

Yes, Ollama can place the layers of one model across several GPUs when a single card lacks enough VRAM for the model and its context. The cost is mainly throughput. Each token must pass data between cards, so split models usually respond more slowly than a model that fits on one GPU, and the gap grows with the number of splits and the speed of the link between cards. Check ollama ps after loading to see how the model was placed. If a model fits on one card, keep it there for latency-sensitive work.

How many models load at once by default?

By default, Ollama allows up to three models per GPU loaded at the same time, so a server with one GPU defaults to three and a server with two GPUs defaults to six. On CPU-only systems the default is three. This limit is set by OLLAMA_MAX_LOADED_MODELS. Loading is limited by memory, not by the count alone, so a large model can block others even under the default. Each model also serves one request at a time unless you raise OLLAMA_NUM_PARALLEL, which increases memory use per model.

What must our team do itself, and what can a partner handle?

Your team keeps ownership of the hardware, the network placement, the identity and access decisions, and the models your organization approves. A partner can take on the sizing study, GPU driver and runtime configuration, placement of models across cards, concurrency settings, service hardening, monitoring and documentation. Decide early who runs upgrades and who responds when a model fails to load, because those duties recur after handover. A fixed-scope engagement sets these boundaries in writing before work starts.

How long does a sizing and configuration project take?

Duration depends on how many GPUs and servers are involved, how many models must run at once, whether the hardware is already installed, the number of workloads with different context and concurrency needs, and how much testing your environment requires. Hardware lead times, driver compatibility checks and access approvals often matter more than configuration itself. Ask for a timeline tied to these drivers in the written scope, with named milestones for benchmarking, handover and verification.

What should we prepare before a consultant starts?

Prepare a hardware inventory that lists each server, GPU model, installed VRAM, driver version, operating system and network path. Add the list of models you intend to run, including parameter counts, quantization and whether they are your own fine-tuned weights. Include expected concurrency, typical prompt and response lengths, peak hours and which applications will call the API. Note any data handling rules, change windows and approval steps. Missing traffic estimates are the most common reason sizing work needs a second round.

Is a second server better than adding more GPUs to one?

It depends on whether the constraint is VRAM for individual models or throughput across many users. Extra GPUs in one host let you keep larger models or more loaded models together, but a single host is still one failure domain and a split model still pays a cross-GPU cost. A second server behind a gateway adds isolation, maintenance windows and capacity for more concurrent users, at the cost of more hosts to patch and monitor. Compare both options against your uptime requirements and your latency targets.

How DeployOpen scopes multi-GPU Ollama work

DeployOpen scopes multi-GPU Ollama work in writing before any server is touched. The first step is an inventory: the GPUs in each host, their VRAM and driver stack, the operating system and container runtime, the network path to users and applications, and the models the organization intends to serve, including any fine-tuned or approved weights. The second step is a sizing and placement plan that records which models are pinned to which GPUs, where a model is allowed to split across cards, and what the concurrency settings should be, including OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE. Each placement decision is tied to a stated context length and expected concurrency, so the client can see why a given layout was chosen. Work is deployed inside the client's own infrastructure, whether that is their cloud accounts, data centers or restricted networks, so models and prompts stay where the client's policies require them.

The configuration stage covers the Ollama service settings, GPU visibility, model storage location through OLLAMA_MODELS, and the access layer placed in front of the API, which the local server does not provide on its own. Load testing follows configuration. DeployOpen runs the agreed mix of concurrent requests against each placement, records which models stay resident, where queueing begins and whether any model falls back to CPU, then adjusts the plan with the client's team. The result is a handover package: the written placement plan, the configuration as deployed, the test results and a runbook for adding or moving models. Confirm with your own environment which GPU models and driver versions your hosts run, since support depends on them.

The engagement is fixed-scope. Hardware, models, concurrency targets, deliverables and timelines are agreed in writing before work starts, and a quote follows from that written scope. Clients who want help after handover can add a retainer for ongoing support, upgrades when new Ollama releases change placement behavior, and repeated load testing as model mixes change. Ask any vendor or partner for the same written scope, and check that it names the specific GPUs, models and test cases it will cover.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.