Tuning Orthanc threads and memory usage on the server you have
Thread counts and the cache and memory capacity settings decide how much memory and CPU Orthanc takes on a given server, so they must be set against that host rather than left at defaults. An imaging team with a server of known RAM and core count needs Orthanc to serve viewers, modalities and background jobs under real study traffic without starving the operating system, the database or other services sharing the machine. This work becomes necessary when a team stands up a new archive, puts Orthanc on a server that also runs other workloads, works within limited RAM, or hears from radiologists that viewers load slowly. Start by recording the core count, total RAM, and what else runs on the box, then review the HTTP and DICOM thread settings and the cache limits in the configuration file for the version you run.
Version matters here. Orthanc 1.13.0, released on 2026-08-15, rewrote storage-area access and DICOM parsing and transcoding to improve caching and reduce memory use, so cache values tuned on 1.12.x may behave differently after an upgrade. Read the Orthanc NEWS file for the 1.13.0 entry, confirm which cache and memory keys your build honors, and retest after any change. Before you adjust anything, estimate total memory use as the sum of the process baseline, the cache allowances, the per-thread stacks and the working memory for large transfers and transcoding, then leave headroom for the operating system and the database engine. Set the values on a staging copy with a representative study load, and record the figures you observe so the production settings have a documented basis.
Which thread and memory settings fit which workload
This table compares the HTTP thread count, the DICOM thread count, the 1.13 cache and memory capacity settings, and the database and plugin choices that affect memory. Read each row as a starting question for your server, then confirm the exact configuration keys in the Orthanc Book for the version you run.
| Setting or choice | When it fits | Trade-off | Confirm before changing |
|---|---|---|---|
| HTTP thread count | Many REST clients, viewers or scripts calling the API at the same time | More threads serve more requests in parallel but each one adds memory and competes for CPU and database connections | Key name and default in the Orthanc Book for your version |
| DICOM thread count | Several modalities or peers sending or retrieving studies at once | More concurrent associations raise throughput but also raise memory use during large transfers | Whether your version separates store and query threads |
| 1.13 cache and memory capacity settings | Large archives where repeated reads of the same files or index rows slow the server | A bigger cache lowers disk reads but holds more RAM, so total memory use must stay within the host limit | Cache size keys and units in the 1.13 documentation |
| SQLite index (default) | Small or test archives with a modest instance count | Simple to run, but it is a single-file index that does not suit large datasets or several writers | Index size guidance in the scalability FAQ |
| PostgreSQL plugin | Large datasets, or several Orthanc instances sharing one index | Moves index memory and connection use to the database server, so it must be sized separately | Connection limits and plugin version compatibility |
| Object storage plugins | Archives where file bytes should live outside the Orthanc host | Reduces local disk pressure but adds network calls that can hold threads longer | Whether your chosen plugin caches data locally |
| Running on limited RAM | Small hosts, clinic servers or shared virtual machines | Lower thread counts and cache sizes reduce peaks but slow busy periods and large studies | Minimum memory stated for your version and workload |
How to size threads and memory step by step
This sequence takes a team from the host's hardware and Orthanc version to a tested thread and memory configuration, with a check at each step so every change is based on measured behavior rather than guesswork.
Record host RAM, cores and storage layout
The infrastructure or platform engineer records the total RAM, usable RAM after the operating system and other services, the number of CPU cores, and whether the Orthanc index and DICOM files sit on the same disk. Ask the hosting team for the figures from the server itself, not from the purchase order, and note whether the host is a virtual machine or container with its own memory limit. This step is done when the team has a one-page inventory that another engineer can check against the running host. Any container memory limit must be recorded here, because Orthanc will be sized against it, not against the physical machine.
Confirm the exact Orthanc version and plugins
The engineer runs the Orthanc build in the target environment and records the core version, the database plugin and each loaded plugin with its version. Memory and caching behavior changed between releases, and the Orthanc 1.13.0 release notes describe a rewrite of storage-area access and DICOM parsing and transcoding aimed at better caching and lower memory use, so settings tuned on an older release may not carry over. Check the release history in the Orthanc NEWS file before deciding which parameters to set. This step is done when the version list is saved alongside the configuration file, so every later measurement can be tied to a specific build.
Set a conservative baseline configuration
The engineer starts from the Orthanc defaults or the vendor-recommended sample for the chosen version, then sets only the HTTP and DICOM thread counts, the cache settings and the database connection limits that the documentation describes for that release. Changing one group of settings at a time keeps later results readable. Store the file under version control with a comment explaining each non-default value. This step is done when the baseline runs on the target host, starts cleanly, and passes a simple study upload and retrieval, which shows the configuration works before any load is applied.
Compute the expected memory footprint
The engineer adds up the memory the configuration can claim: the cache and memory capacity settings for the chosen version, the per-thread working memory implied by the HTTP and DICOM thread counts, the database client connections, and the operating system and plugin overhead. Compare the total with the RAM recorded in step one and leave headroom for spikes during large transfers. Write the calculation down with each assumption labeled, so reviewers can challenge it. This step is done when the estimate fits the available memory with margin. If it does not, reduce the largest cache or thread setting before loading the server, because an overcommitted host fails under load in ways that are hard to diagnose.
Run representative load in three patterns
A test engineer, working with the imaging team, runs three workloads against the baseline: viewer retrievals that mimic radiologists opening studies, C-STORE bursts that mimic a modality sending a batch of images, and large find queries against the study index. Use realistic study sizes from the actual archive and run each pattern long enough to reach steady state. Include retrievals of the largest studies, since they stress memory the most. This step is done when each pattern has a recorded run with its start and end times, the number of operations, and any errors, so the results can be compared with the baseline and with later changes.
Check saturation metrics before each change
The engineer reviews the host and Orthanc metrics captured during each load run: memory in use against the physical limit, swap activity, CPU saturation, the number of busy HTTP and DICOM threads, queued jobs, and request latency. Orthanc's built-in Prometheus endpoint exposes thread and job metrics that can be scraped for this purpose. Confirm which metrics your version exposes before relying on them. This step is done when the team can state which resource was the limiting factor in each run, whether that is memory, threads, disk or the database. A change is only justified if the measurements show that resource is the bottleneck.
Adjust one setting and repeat the test
Based on the bottleneck identified in the previous step, the engineer changes a single thread count, cache setting or connection limit, then repeats the same three load patterns under the same conditions. Record the new configuration as a new version in source control so the change history is traceable. Keep the earlier results for comparison. This step is done when the new run shows the intended effect on the limiting metric without pushing another resource past its limit. Repeat this loop until the results meet the agreed targets, then sign off the configuration and file the memory calculation with the test record.
Document the final sizing and alert thresholds
The platform team writes the final configuration, the memory calculation, the test records and the metric thresholds that signal saturation, such as sustained memory pressure or queued jobs that do not drain. Set alerts on those thresholds and assign an owner for each. Ask the vendor or Orthanc Team for guidance on the expected behavior of the release in use, and retest after every version upgrade, because the memory model may change. This step is done when an engineer who was not involved in the tests can read the document, reproduce the baseline, and know which alert means the host needs more memory or a different setting.
How total memory use adds up across threads, cache and the database
Total memory use on an Orthanc host is the sum of four parts, and none of them can be sized from the others alone. The first is the process baseline: the memory the Orthanc core and its loaded plugins hold before any study arrives. The second is cache capacity, the memory Orthanc is allowed to fill with DICOM files and parsed data to avoid rereading the storage area. The third is per-thread working memory, which grows while a thread parses a large instance or transcodes it to another transfer syntax, and it multiplies with the number of HTTP and DICOM threads that happen to be busy at the same moment. The fourth is the database engine when it runs on the same host, for example PostgreSQL with its own shared buffers and connection processes. Add the four together for the worst case you expect, then check it against the physical RAM and any container memory limit on the server.
The 1.13.0 release rewrote storage-area access and DICOM parsing and transcoding to improve caching and reduce memory use, so the sizes that held for earlier 1.12 builds are not a safe starting point. Confirm the cache and thread settings your version exposes in its configuration reference, and confirm how the 1.13 rewrite changed what the cache actually holds, before you copy any figure from an older tuning guide. Treat the cache as a setting you validate, not one you assume will behave the same way after an upgrade.
Measure rather than assume. Run a representative load of retrieves, uploads and transcoding requests on a staging host that matches production memory and storage, record resident memory for the Orthanc process and the database separately under peak concurrency, and repeat the test after each change to cache or thread settings. Ask your vendor or the Orthanc community to confirm which memory components are reported per process and which are shared, so the totals you add up in your own environment reflect what the host really uses.
Running Orthanc on limited RAM without starving other services
On a shared or small server, Orthanc competes with the database, viewers and other services for the same memory and CPU. The cards below cover the levers that lower Orthanc's footprint, what each one costs in speed, and what to measure before and after a change.
Lower the cache capacity
The cache settings control how much DICOM data Orthanc keeps in memory between requests. Reducing them lowers peak memory, but repeated retrievals of the same studies then read from storage more often, so response times for viewers and modalities rise. Start by checking how often the same studies are requested in your workload, then reduce the cache in small steps and compare retrieval times and resident memory after each change. Confirm the exact configuration keys for your Orthanc version in the 1.13 documentation before editing production files.
Scalability FAQCap concurrent DICOM and HTTP work
Each concurrent DICOM association and HTTP request holds memory while it runs. Limiting how many run at once bounds that memory, but a busy modality or viewer may queue behind others and wait longer. Compare the number of simultaneous C-STORE and C-MOVE operations your sites really send with the thread settings you configured. Keep HTTP capacity high enough for viewers that load many instances in parallel, and check the thread metrics during peak hours before settling on a limit.
Move the index to a dedicated host
The built-in SQLite index runs inside the Orthanc process, while the PostgreSQL plugin moves the index into a separate database server. On a small host, moving PostgreSQL to its own machine frees memory for Orthanc and gives the database room for its own buffers. The trade-off is a network hop on every index query and one more system to patch, back up and monitor. Confirm the index size and the plugin version you plan to run before choosing this split.
Orthanc pluginsKeep heavy services off the Orthanc host
Search engines, analytics jobs, backup agents and other large services that share the Orthanc server reduce the memory available to it, and Orthanc's own spikes can starve them in turn. Move these services to separate hosts or set memory limits on their containers so one cannot exhaust the machine. Before deciding, record the memory each service uses at peak, not at idle, and check that the host keeps headroom for file system caching of the DICOM files.
Stop viewers from forcing large transcodes
Transcoding a compressed study to an uncompressed or different transfer syntax is memory and CPU intensive, and a viewer that requests it for every study can multiply that load. Decide which transfer syntaxes your viewers need, configure them to request those formats, and check whether they can accept the stored format directly. Monitor transcoding activity alongside memory use, since a few large requests can drive the peak more than average traffic does.
Security FAQHow request load, threads, cache and the database share one host
Requests start at viewers and modalities and enter through the HTTP and DICOM threads. Both feed the Orthanc process, where the cache and parsing or transcoding work consume memory. Work then reaches the index database and the storage area, which may sit on the same host or elsewhere. Check each arrow's memory cost against the host boundary, because every component inside it draws from the same RAM.
Request paths from clients through threads and cache to storage, inside one host's memory.
Which metrics show Orthanc is saturated
Thread and memory saturation rarely announce themselves with a single failure. They show up as queues that stop draining, responses that slow down and hosts that start paging, usually before any study is lost. The cards below list the signals to watch and the checks that tell you whether a spike is a sizing problem or a one-off workload.
Thread pool occupancy
Orthanc serves HTTP requests and DICOM associations from separate thread pools, and each pool has a fixed size set in the configuration. When the number of busy threads stays at or near the configured maximum, new requests wait for a free thread. Check occupancy during your normal peak, not only during tests, and compare the HTTP and DICOM pools separately. Metric names differ by version, so confirm the exact thread metrics your release exposes before writing alert rules.
Scalability FAQJob queue growth
Background work such as C-FIND follow-ups, transfers and DICOM store jobs runs in a queue. If the queue length climbs during the working day and does not return to zero overnight, workers are not keeping up with arrivals. Compare queue growth with the thread counts above it: a full thread pool with a growing queue points to thread or CPU limits, while a growing queue with idle threads usually points to a blocked job or a slow storage or database back end.
Rising REST latency
Measure how long typical REST calls take, such as study lookups and instance downloads, from a client on the same network as your viewers. A steady increase at constant load often means the server is spending time on memory pressure, cache misses or paging rather than on request handling. Record latency percentiles over time, not averages, because the tail moves first when a pool or cache is exhausted.
Swap activity on the host
Any sustained swap-in or swap-out on the Orthanc host is a strong sign that resident memory has exceeded physical RAM. Paging adds latency to every cache access and can make a healthy process look hung to health checks. Check swap counters and page-fault rates at the operating system level, because Orthanc's own metrics do not show paging. Treat sustained swap use as a sizing finding, not a tuning finding.
Resident memory near host limits
Track the resident set size of the Orthanc process against the memory available to it, including any container memory limit. Growth that does not level off after the cache fills suggests either an oversized cache setting or a leak in a plugin. Compare the value with your own computed total from the cache and capacity settings. If resident memory keeps approaching the limit while the cache is not full, investigate the plugins and the workload before raising any setting.
Slow C-STORE and retrieve completion
Time how long incoming C-STORE requests and outgoing C-MOVE or C-GET retrievals take to finish, from the modality's point of view. When completion times grow while network throughput stays flat, Orthanc may be waiting for a thread, a database write or a disk. Compare these timings with the job queue and thread occupancy in the same window, and confirm with the modality vendor whether its own timeouts are being hit.
Questions teams ask before tuning Orthanc memory
How long does tuning Orthanc threads and memory take?
The duration depends mostly on how many Orthanc instances share the host, how varied the study traffic is, and whether a test environment that mirrors production exists. A single instance on a dedicated server with a known workload is a much smaller job than a multi-site archive with modalities, viewers and transfers all loading the same host. The work usually moves through three phases: measuring current use under real load, adjusting HTTP and DICOM thread counts and cache settings, and then repeating the measurements to confirm the change. Ask any partner to state the duration in the written scope, with the number of environments, the load profile to be replayed and the retest included.
Can our in-house team tune Orthanc memory without a partner?
Yes, if the team has Linux or Windows administration skills, access to the Orthanc configuration and the ability to generate representative traffic. Tuning is mostly measurement and iteration: set a baseline, change one setting, and watch memory, thread saturation and response times. The harder part is knowing which metrics matter and building a load test that resembles real modality and viewer activity. Teams that lack a test environment or have no one who owns Orthanc operations often benefit from an outside review, which can be scoped as a fixed piece of work.
What do we need to provide for a tuning engagement?
Plan to provide the following before work starts:
- Administrative access to the host or hosts running Orthanc, including the operating system, Docker or service configuration and the Orthanc configuration file
- A representative sample of study traffic, such as the mix of C-STORE, C-FIND, C-MOVE and REST calls seen at peak hours, captured or described from your logs
- Existing metrics or logs covering memory, CPU, disk I/O and thread activity, ideally for several weeks including a busy period
- Named contacts from the imaging, radiology IT and infrastructure teams who can approve changes and confirm whether results match clinical expectations
Confirm with your team which of these exist and how long they can be shared before the scope is written.
What does a partner quote cover for Orthanc tuning?
A written quote should list the environments in scope, the metrics collected, the load tests run, each configuration change proposed and tested, the retest after changes, and the handover notes for your operators. Orthanc has no paid edition, so licensing is not a line item. Orthanc Team SRL, the company that develops the project, sells deployment, configuration and development services, including pre-paid dedicated support hours valid for 12 months, and quotes them on request. Ask whether support hours are part of the fee, how many are included, what happens if they run out, and whether follow-up changes after a major upgrade are covered. DeployOpen quotes follow from a written, fixed scope.
How do Orthanc 1.13 upgrades change the memory tuning advice?
Orthanc 1.13.0 was released on 2026-08-15 with a rewrite of storage-area access and DICOM parsing and transcoding aimed at better caching and lower memory use. Settings tuned on 1.12.x may therefore show different memory behavior after the upgrade, so any cache or capacity values carried over from older notes should be measured again rather than assumed to still fit. Read the release notes for the exact cache and memory settings that changed, test the upgrade in a staging copy with realistic load, and keep the previous configuration available for rollback. Plan the upgrade alongside plugin and database versions, since those also affect memory use.
When should we add RAM or move to object storage instead of tuning?
Add memory or move storage when measurements show that the workload itself exceeds the host, not when a setting is poorly chosen. Signs include sustained memory pressure after reasonable thread and cache settings are tested, disk I/O that limits ingest or retrieval, and an index that has grown well beyond the point where the Orthanc project recommends an enterprise database engine. The Orthanc scalability FAQ recommends the PostgreSQL plugin for large datasets once several hundred thousand instances are stored. Object storage addresses file growth rather than memory, so it fits archives where the disk is the constraint. Compare the cost of hardware or cloud capacity with the effort of further tuning before deciding.
Can Orthanc run on a server with limited RAM?
Orthanc can run on modest hardware for small sites, but the margin for error is smaller. On a limited host, the main levers are the number of HTTP and DICOM threads, the sizes of the caches Orthanc keeps in memory, and the load placed on the instance at the same time. Reducing threads lowers concurrency and can slow ingest, so the aim is to find the lowest setting that still meets clinical response times. Confirm the minimum memory figure with the Orthanc documentation for your version and test the chosen values under peak load before go-live.
Which metrics show that Orthanc is saturated?
Look for several signals together rather than a single number. Watch thread utilization for the HTTP and DICOM servers, since threads that stay fully busy mean requests are queuing. Track memory growth over days, not minutes, to separate normal caching from a leak, and watch swap activity, which often precedes slow responses. Disk latency and queue depth show whether storage or the database is the bottleneck. Orthanc exposes built-in Prometheus metrics, including thread and job counts, so scrape them and set alerts on sustained thresholds you have validated in testing. Confirm which metric names your Orthanc version provides before building dashboards.
Official Orthanc sources for thread and memory settings
Start with the Orthanc NEWS file, which records the change notes for each release, including the 1.13.0 release of 2026-08-15. That release rewrote storage-area access and DICOM parsing and transcoding to improve caching and reduce memory use, so any cache or memory setting you carried over from an older version should be re-checked against the notes before you change production. The NEWS file is the place to confirm what changed, not what a setting should be, so read it alongside the release you actually run. Ask whoever maintains your Orthanc hosts which exact version is deployed, because the 1.12.x and 1.13.x lines behave differently in memory use.
For guidance rather than release history, read the Orthanc Book scalability FAQ and security FAQ. The scalability FAQ explains how multiple instances share one database and where the project expects large archives to run, which directly affects how many threads and how much memory each node needs. The security FAQ matters for the same settings because remote access, authentication and the routes that run scripts or write files all change the load a server accepts. Treat both FAQs as the project's reasoning, and confirm any number you plan to use against the configuration reference for your exact version, because defaults and key names can change between releases. Record the version and the reference page you used so a later upgrade review can repeat the check.

