Sizing an Ollama server for concurrent users starts with parallel slots
When a team wants many people sharing one self-hosted Ollama server, concurrency is governed by three settings: OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE. The defaults are 1 parallel request per model, loaded models capped at 3 times the number of GPUs (or 3 on CPU), and 512 queued requests. Treat sizing as a planning exercise across these three controls, the hardware under them and the models you expect people to use, not as a single number you raise until the server feels fast enough.
This page walks through that planning in order. It starts with parallel slots, because each slot for a model holds its own working memory while a request is in flight, so raising OLLAMA_NUM_PARALLEL multiplies the memory a loaded model needs. Later sections cover loaded models and how they compete for VRAM, the queue and what users see when it fills, and the point at which a second server behind a gateway is a better answer than a bigger first one. Before you change anything, ask your vendor or test environment to confirm how memory grows per slot for the exact model, quantization and context length you plan to serve, since the defaults alone do not tell you whether your hardware can hold your target load.
A practical first step is to write down your expected load in terms that the server can act on: how many people will send requests at the same moment, how long a typical response runs, and which models they will use. Those answers determine whether one model with a few parallel slots is enough, or whether several models must stay resident at once. Requests beyond the available slots wait in the queue, so the queue depth and the wait a user will tolerate are part of the same decision. Ollama's documentation lists these variables and their defaults in its Ollama FAQ, which is the right reference to check against your installed version before you change any value.
Do not rely on a single load test with one model. Run a representative mix of prompts, measure response times and memory use at the highest concurrency you expect, and confirm that the GPU does not spill into CPU offload under that load. If the test shows slow responses or memory pressure, the fix may be a smaller model, a shorter context, fewer parallel slots or a second server, and each option has different consequences for users. Record the settings and results so that the next upgrade or model change can be checked against the same baseline.
Which concurrency setting fits which bottleneck
This table compares OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE by default, what each controls, the symptom that points to it and the memory or latency cost of raising it. Read each row against the symptom you see in practice, because raising the wrong setting adds memory pressure without relieving the queue. The main takeaway is that parallel slots cost memory per model, loaded models cost VRAM, and the queue only delays overload.
| Setting | What it controls and default | Symptom that points to it | Trade-off when raised |
|---|---|---|---|
| OLLAMA_NUM_PARALLEL | Concurrent requests served by one loaded model. Default is 1 per the Ollama FAQ. | Requests for the same model wait while the GPU is idle or lightly used, and response times climb with more users. | Each slot needs its own context memory, so VRAM use grows with the context window and slot count. Confirm the fit for your model. |
| OLLAMA_MAX_LOADED_MODELS | How many models stay in memory at once. Default is 3 times the GPU count, or 3 on CPU, per the Ollama FAQ. | Requests for a second model stall while the first unloads and reloads, which shows up as long first-token delays. | Each extra resident model consumes VRAM or system RAM, so loading may force partial CPU offload or evictions. |
| OLLAMA_MAX_QUEUE | How many requests can wait before new ones are rejected. Default is 512 queued requests per the Ollama FAQ. | Clients see growing wait times during peaks, or a backlog that keeps building after load should have eased. | A larger queue hides overload and lengthens worst-case waits. Lowering it fails fast, which clients must handle with retries. |
How memory per parallel slot limits concurrent users
Each parallel request needs its own working context on top of the model weights, so raising OLLAMA_NUM_PARALLEL adds memory use even when the model itself stays the same size. The weights are loaded once per model, but the key-value cache that holds the conversation for each in-flight request is allocated per slot, and that cache grows with the context length each request is allowed to use. A server that fits one request comfortably can run out of room when the same model serves several requests at once, and the failure often shows up as partial CPU offload or as the model being unloaded to make space, both of which slow responses for every user on the box.
Do not assume a per-user memory figure from a table or a forum post. Load the model you plan to serve with the context length your users will actually send, set OLLAMA_NUM_PARALLEL to the value you are considering, send concurrent requests that approximate your peak, and then check GPU memory with nvidia-smi or rocm-smi and the processor split reported by ollama ps. Repeat the test at each parallelism value and at your longest context, because the result depends on quantization, model architecture and context length together. Confirm how memory scales for your model with the VRAM, model size and context length guidance in the sibling topics before you commit to a parallelism value.
Treat the result as a ceiling for concurrency, not a target. If the measured headroom at your peak context is small, the choices are a smaller model, a shorter context limit, a GPU with more VRAM, or a second server behind a gateway, and each one changes the queueing picture described above. Record the measured numbers alongside the configuration so that a model update or a change in typical prompt length can be checked against a known baseline.
Plan the concurrency settings before you add users
This sequence turns a user count into concrete values for OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE, checked against measured memory and real pilot traffic before the server goes to the full group.
Define target users and peak concurrent requests
The platform owner and the team leads agree on how many people will use the server, how many of them will send requests at the same moment during a busy period, and how long a typical request runs. Write these as named numbers in the sizing worksheet, with the source of each estimate (survey, current tool logs or a stated assumption). Done when the team can state a peak concurrent request figure and say which assumption it depends on most.
Choose models and context length per workload
List the models each workload needs and the context length each one requires, then note which models must be resident at the same time. Keep the list short, because every extra model competes for the same GPU memory. Done when each workload has one named model, one context length and a flag for whether it must stay loaded during peak hours.
Measure memory with a single parallel slot
Set OLLAMA_NUM_PARALLEL to its default of 1 on a test host, load each chosen model and run a representative prompt at the planned context length. Record GPU memory from your monitoring tool and check with ollama ps whether the model sits fully on the GPU. Done when you have a measured memory figure for one slot per model and confirmed that no model falls back to CPU offload.
Set parallel slots and loaded models within memory
Estimate the extra memory each additional parallel slot needs at your context length, then choose OLLAMA_NUM_PARALLEL and OLLAMA_MAX_LOADED_MODELS so that the total of all loaded models and slots fits the available GPU memory with headroom for the operating system and other processes. Confirm the default for OLLAMA_MAX_LOADED_MODELS (3 times the number of GPUs, or 3 on CPU) and override it if your model list is shorter or longer. Done when the written budget shows the calculated total and the chosen values are below it.
Set the queue depth users can tolerate
Set OLLAMA_MAX_QUEUE, which defaults to 512 queued requests, to a value that matches how long a user is willing to wait before the request should fail. Multiply the expected wait by your throughput per slot to find the depth that corresponds to that wait. The client application must also show a clear message when requests are rejected. Done when the team has a written maximum wait per workload and a queue depth that produces it, and the client error path has been tested.
Load test the configuration at peak volume
Run a load test with a tool your team already uses against a staging server built with the chosen settings. Send the peak concurrent request count, then increase it past peak to see where queueing starts and where requests are refused. Track queue depth, time to first token and total latency, and GPU memory during the test. Done when the results show the peak load is served within the agreed wait and the point of rejection is known.
Validate with a pilot group before full rollout
Give a small group of real users access through the same gateway or client path used in production, and collect their reports on waiting time, errors and slow answers for an agreed period. Compare the observations with the load test results and adjust one setting at a time. Done when the pilot group reports acceptable waits during their busiest period and the team has decided whether the single server is enough or a second server is needed behind a gateway.
How requests flow through one server and a gateway
The diagram starts with client applications calling a gateway or reverse proxy, which forwards requests to the Ollama server on port 11434. Inside the server, requests are assigned to parallel slots for each loaded model, and when those slots are full, overflow waits in the queue controlled by OLLAMA_MAX_QUEUE. The second server sits behind the same gateway as an option. Check where the queue fills first, because a full queue means the server is overloaded rather than slow.
Requests pass through a gateway into one or more Ollama servers, with overflow held in a queue.
What happens when requests exceed slots and queue
When more requests arrive for a model than it has parallel slots, the extra requests do not fail at once. They wait in a queue until a slot frees up. The number of slots per model is set by OLLAMA_NUM_PARALLEL, which defaults to 1, so a server that has not been tuned will serialize most traffic for each model. The queue itself is bounded by OLLAMA_MAX_QUEUE, which defaults to 512 queued requests. Requests waiting in the queue add latency for the user even though the server is working correctly, so the first planning question is how long a waiting user can tolerate, not only how many requests the server can hold.
Once the queue is full, Ollama rejects new requests instead of holding them. The exact status code, error text and whether the response is streamed or buffered are behavior you must confirm for your Ollama version, since the server and its API have changed across releases. Your gateway or reverse proxy adds a second layer: if it times out before Ollama responds, the client sees a gateway error even though Ollama is still generating or still queued. Read the timeout settings of every hop in the request path, including client SDK defaults, and test a saturated server with a load tool so you know which error each caller will actually receive.
Plan the response to queue pressure before users reach it. Decide the acceptable wait per request, set the gateway timeout to match, and have the application show a clear retry message rather than a silent hang. Watch queue depth and request duration in your logs and metrics so you see saturation before the queue limit is hit. If waits regularly exceed your tolerance even after you have sized slots and memory correctly, that is the signal to evaluate a second server behind a gateway, which is covered in the next section.
When to add a second server behind a gateway
A single Ollama server is a good starting point, but it has limits on queue depth, memory and availability. The four cards below describe the signals that justify a second host, and the gateway work that a second host brings with it.
Sustained queueing at peak
Requests wait in line when parallel slots are full, and the queue holds up to the OLLAMA_MAX_QUEUE limit, which defaults to 512 queued requests. Occasional waits are normal. Persistent waits during business hours mean the server cannot keep up with demand. Measure how long requests sit in the queue at peak, not just the average response time, before you decide to add hardware.
Memory budget reached with the chosen model
Each parallel slot adds memory on top of the model weights, so raising OLLAMA_NUM_PARALLEL can exhaust VRAM before the GPU is busy. If the model, the context length you need and the parallel count do not fit together on one card set, a second server gives you room without downgrading the model. Work out the memory for your target load first, then compare it against what one host offers.
- Default parallel requests
- 1
Separate models on separate hardware
Some teams need a large model for complex work and a small model for high-volume tasks. Loading both on one host means they compete for the same GPUs and may evict each other, since OLLAMA_MAX_LOADED_MODELS caps how many stay resident. Dedicating a host to each model gives each workload predictable latency and simpler capacity planning, at the cost of a second machine to patch and monitor.
Availability requirements for a single host
One server is one failure domain. A driver update, a GPU fault or a reboot takes the whole service offline. If users or downstream applications depend on the endpoint during working hours, decide what downtime is acceptable and whether a second host, with traffic moved away from a failed server, is required. Confirm your own uptime target with the business owner, since Ollama itself does not provide a high availability feature for this purpose.
Gateway work a second server adds
Two servers need a reverse proxy or gateway that routes requests, checks health, and enforces authentication in front of the API, which Ollama does not provide on its own. Plan how the gateway detects an unhealthy host, how models are kept identical across hosts, how sessions are routed, and where logs are collected. Each of these adds configuration and operational work that a single host does not need.
Ollama FAQQuestions buyers ask about sizing Ollama for concurrent users
How much does a sizing exercise for concurrent Ollama users cost?
The cost depends on how many models, user groups and hardware platforms are in scope, and on how much load testing the team needs to trust the result. A sizing exercise is usually priced from a written scope, so the quote reflects the work rather than a standard rate. Ask the provider to separate the one-time work (requirements review, parameter selection, load test design and the written sizing report) from any recurring work such as re-sizing after new models or a Ollama upgrade. Also ask who runs the load tests, which hardware is used for them, and whether the results are delivered as a report you can keep. DeployOpen does not publish a price list, so a quote follows from the written scope.
How long does a pilot for a shared Ollama server take?
Duration depends on how many models you want to test, how well your traffic patterns are known, and how quickly access and hardware are available. A pilot needs a server with the target GPUs or equivalent hardware, a defined set of models, a representative prompt mix and a named person who can approve results. The Ollama FAQ defines the default concurrency values, so a pilot can start by testing those defaults before tuning them. Confirm with your provider the milestones, the number of test rounds and the acceptance criteria in writing before the pilot starts, since these set the timeline.
Can our own team size an Ollama server for concurrent users?
Yes, a capable platform or infrastructure team can do the first pass without outside help, provided it understands how Ollama handles parallel requests and memory. The core settings are OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE, with defaults of 1 parallel request per model, 3 times the number of GPUs (or 3 on CPU) for loaded models, and 512 queued requests. The harder part is measuring real behavior under your prompt lengths and model sizes. Your team needs someone who can run repeatable load tests, read queue and memory metrics, and document the result. Outside help is most useful when the answer must be defended to a security, compliance or architecture review.
What hardware and usage data do we need to give a sizing provider?
A provider needs enough information to estimate memory and concurrency before any test runs. Prepare the following:
- Server inventory: GPU models, count, VRAM per GPU, system RAM, and operating system or container platform
- Models: names, parameter counts, quantization levels and the context length you intend to allow
- Traffic: expected number of users, peak concurrent requests, typical prompt and response sizes, and how often models are switched
- Constraints: latency targets you can state in words, network placement, and whether the server runs in an isolated network
With these inputs, the provider can plan the test matrix. Missing context length or peak concurrency values are the most common reasons a first estimate is wrong.
When is a second Ollama server worth the added gateway work?
Add a second server when one server cannot meet your concurrency or availability needs after the parallel, loaded-model and queue settings have been tuned against your hardware. Queue depth is a useful signal: the default queue limit is 512 queued requests, and if requests wait long enough to hurt users before that limit matters, one server is saturated. A second server also brings the gateway work, which includes routing, health checks, authentication in front of each node, consistent model versions and log collection. Treat the gateway as part of the cost. Confirm with your team which failure you are trying to avoid, since capacity and availability call for different designs.
Does Ollama send our prompts to a vendor when we size for concurrency?
When Ollama runs locally, the Ollama FAQ states that it does not see your prompts or data. Cloud features can be turned off with OLLAMA_NO_CLOUD=1 or in the server configuration file, which is relevant when a security review asks where traffic goes. Sizing tests should therefore run on your own servers using representative but approved data, and load tests should avoid live customer records. Confirm the settings in the environment you will run, because a sizing test that uses a cloud model will not reflect your local hardware.
What is the ongoing effort after the first sizing is done?
Sizing is not a one-time event because model choices, Ollama releases and user numbers all change the answer. Ongoing effort includes re-testing when you add a model, change context length, change quantization, or upgrade Ollama, since release notes can change defaults and behavior. Ollama publishes frequent releases, so keep a record of the version the sizing was based on. Ask a provider whether re-sizing is included in support or billed separately, and whether ongoing support and continuous testing are offered as a retainer.
Where to read the official concurrency settings
Start with the Ollama FAQ, which is the source for the three concurrency controls this topic depends on: OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE. Its entries state the default for each setting, and those defaults are the baseline your sizing worksheet should start from. Read them before you size anything, and record the values in your planning document with the date you read them, because the defaults are the first thing a later release can change. If your environment overrides any of these variables in a service file, a container definition or a shell profile, note the override next to the default so that a future reviewer can see what the server actually runs with.
The version you run matters as much as the documentation you read. Ollama ships frequent releases, so confirm the exact version on your server with the Ollama command line and compare it against the Ollama GitHub releases page. Look at the release notes between your version and the current one for changes to scheduling, queueing, memory estimation or model loading, since those are the areas that alter the numbers in your plan. Pre-releases are listed on the same page, so check whether the build you intend to deploy is a stable release or a pre-release before you base a capacity decision on it.
If the FAQ and your observed behavior disagree, treat the running server as the authority and raise it with your platform team before changing production settings. Keep a short change log that pairs each concurrency setting with the Ollama version it was tested against, so that every upgrade triggers a retest of your load assumptions.
How DeployOpen sizes and delivers a concurrent Ollama server
DeployOpen approaches concurrent Ollama sizing as a written, fixed-scope engagement inside your own infrastructure. We start from the users, models and request patterns you expect, then set and test the concurrency, queue and hardware settings before anything goes into shared use.
How we scope
- Document expected concurrent users, models, context lengths and peak request patterns before any configuration is chosen.
- Agree in writing which models stay loaded, which sit on demand and what queue depth users will see.
- Confirm the target hardware, operating system, network placement and whether a second server or gateway is in scope.
How we build
- Configure OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE against the scoped workload rather than leaving defaults unexamined.
- Measure memory use per parallel slot under realistic load and check that models stay on GPU without offloading to CPU.
- Test queueing and overload behavior with load tests, then document the limits at which requests start to wait or fail.
How we hand over
- Deliver a sizing record covering chosen settings, measured memory figures, test results and the assumptions behind them.
- Provide service configuration files, a runbook for changing concurrency settings and steps for validating a restart.
- Walk through the decision points for adding a second server behind a gateway, so your team can plan the next step.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, including re-testing after Ollama version changes.
- Re-run load tests when user counts, models or context lengths change, and update the sizing record accordingly.
- Ask for a quote based on the written scope, which sets out the components, deliverables and timelines before work starts.

