Orthanc performance tuning for large archives: where to start
Performance tuning for Orthanc means changing the database, storage and configuration choices so an archive keeps responding as its study count grows, rather than adjusting settings after users complain. The built-in SQLite index is fine for small installations, but the Orthanc Book's scalability FAQ says it should be replaced by an enterprise database engine once the server stores several hundred thousand DICOM instances. For large datasets the docs recommend the PostgreSQL plugin, which is the starting point for the rest of this topic.
The scale is real and worth planning against. The Orthanc Book cites production hospital deployments holding more than 65 TB of data, 340,000 studies and around 150 million instances. At that size, the index, the file storage and the disks under them determine most of what users feel. Tuning therefore starts with the database and storage layout: confirm that the PostgreSQL server runs on SSD, that the DICOM files sit on storage with enough throughput for your study volumes, and that compression and storage settings match how your archive is read and written. Thread counts and memory caches come later, once those foundations are fixed.
Before changing any setting, record a baseline. Note the instance count, the database size, how long C-STORE ingestion and REST queries take at peak, and the free space on each volume. Then confirm the exact configuration keys and defaults for your Orthanc version in the Orthanc Book, since the 1.13.0 release on 2026-08-15 reworked storage-area access and caching. Ask your database and storage team to confirm the PostgreSQL version you plan to run, and treat any tuning change as a measured experiment against that baseline.
Tuning decisions follow archive size and measured load
The diagram starts with archive size, which decides whether the index stays on SQLite or moves to PostgreSQL. After the database choice, storage layout and compression are set first, then find and query limits, then saved jobs and debug settings, because each step changes the load the next one is judged against. The last check is measured load and growth: if local storage still has headroom, files stay on disk, and if growth or disk limits are reached, evaluate object storage. Re-check each branch after a major change in study volume.
Order of tuning decisions, with branches set by archive size and measured load.
Which Orthanc settings matter for a large archive and when each fits
This table lists the configuration areas the Orthanc Book covers for large archives, with the situation where each one fits and the trade-off it carries. Read each row against your study volume, growth rate and number of concurrent users, then confirm current key names and defaults in the Orthanc Book for the release you run. The main takeaway is that the database and storage choices shape most of the tuning work that follows.
| Setting area | When it fits | Trade-off to weigh |
|---|---|---|
| PostgreSQL plugin | Archives approaching several hundred thousand instances, or any setup with multiple Orthanc instances on one index. | Adds a database server to operate, back up and patch, so you need PostgreSQL skills in-house or from a partner. |
| Built-in SQLite index | Small, test or early-stage archives well below the several hundred thousand instance mark. | Simple to run as a single file, but the docs advise replacing it at scale, so plan that migration early. |
| Object storage plugins (S3, Azure, Google Cloud) | Storage growth outpaces local disks, or your organization already standardizes on one cloud provider's object storage. | Moves DICOM files off local disk, but reads depend on network latency, and request and egress charges come from the provider. |
| Storage compression | Large archives where disk cost drives the design and the server has spare CPU capacity. | Saves space but adds CPU work on store and retrieval, so test retrieve times with your modalities and viewers. |
| Find limits | Shared archives where broad queries from viewers or integrations could return very large result sets. | Protects the server from heavy queries, but capped results can confuse users, so confirm the key and its behavior in your release. |
| Saved jobs | Long-running bulk work such as large transfers or bulk moves that must resume after a service restart. | Work survives restarts, but the queue must be monitored, and backlogs grow with volume. |
| Debug assertions | Troubleshooting sessions or test builds, ideally under guidance from the Orthanc project or your partner. | Extra internal checks help isolate faults but slow processing, so keep them off in routine production runs. |
Why PostgreSQL on SSD is the first tuning decision
The first tuning decision for a large Orthanc archive is the index database. The built-in SQLite index should give way to an enterprise database engine once the archive holds several hundred thousand DICOM instances, and the Orthanc docs recommend the PostgreSQL plugin for large datasets. Make this switch before the archive grows, because moving a loaded index later is more work than choosing the right engine at the start. Confirm the instance count you expect within your retention period, then plan the database engine against that number rather than against today's volume.
PostgreSQL is released under the PostgreSQL License, a liberal open source license similar to the BSD or MIT licenses, so the database itself adds no license fee to your archive. The PostgreSQL project ships a new major version about once a year, issues minor releases at least once every three months, and supports each major version for 5 years after its initial release. Check the PostgreSQL versioning policy when you pick a major version, so the version you deploy is still supported for the life of the archive. Put the database on SSD storage: the index is read and written on almost every study store, query and retrieve, so storage latency shows up directly in Orthanc response times. Ask your storage team to measure latency under load on the actual volume, not only its rated throughput.
The database choice also shapes later high availability work. Since Orthanc 1.9.2 with PostgreSQL and MySQL plugins 4.0, multiple Orthanc instances can read and write the same database, which makes horizontally scaled and highly available setups possible. Decide now whether the index will be a single instance or a cluster, because replication, connection pooling and failover planning all depend on that answer. Confirm with your Orthanc Team or implementation partner which plugin and database versions you will run together before you commit to a design.
Where large Orthanc archives usually slow down
Large Orthanc archives rarely slow down in one place. The pressure usually shows up first in the index, the disk, memory, background jobs, database connections or find queries, and each one leaves a different signal in logs and metrics. Check them in that order before changing settings, so you tune the component that is actually saturated.
Index query load
The index holds patient, study, series and instance records, and every find, lookup and retrieve reads it. Once an archive holds several hundred thousand instances, the built-in SQLite index is the usual first bottleneck, which is why the project recommends the PostgreSQL plugin for large datasets. Check query latency on the REST API and database load on the PostgreSQL server, especially during bulk imports and anonymization runs.
Scalability FAQDisk throughput for DICOM files
Storing and reading DICOM files is sequential and heavy, and large studies can saturate a volume that looks idle on average. Watch disk latency and queue depth during peak C-STORE traffic and when viewers load full studies at once. Put the database on SSD storage as a separate concern from the file store, and confirm the file volume can absorb your peak ingest, not just your daily average.
Memory pressure from transcoding and caching
Transcoding and caching compete for the same RAM as the HTTP and DICOM threads. Orthanc 1.13.0 rewrote storage-area access and DICOM parsing and transcoding to improve caching and reduce memory use, so the version you run changes this profile. Look for swapping, rising resident memory during viewer sessions and transcoding-heavy workloads, and check the cache capacity settings before adding RAM.
Orthanc NEWS fileBackground job backlog
Jobs such as large exports, transfers, anonymizations and recycling queue behind each other and can starve interactive requests. A growing queue with long wait times means work is arriving faster than the instance drains it, even when CPU looks normal. Check the jobs queue depth and the time jobs spend waiting, and schedule heavy batches away from clinical hours before raising thread counts.
Connection handling to PostgreSQL
Each Orthanc instance opens its own connections to PostgreSQL, so several nodes plus threads can exhaust the server's connection limit or leave many idle sessions holding memory. Symptoms include connection errors under load and slow queries that wait on locks rather than doing work. Compare the number of connections per instance with the server's configured maximum, and consider a pooler such as PgBouncer before increasing the database's connection limit.
PgBouncer projectFind queries returning large result sets
A broad find, such as a wildcard search across a multi-year archive, can return tens of thousands of matches and force Orthanc to build and serialize a large response. Clients that page through results or repeat the same query multiply the cost. Review the find limits set in the configuration, identify which viewers or scripts issue unbounded queries, and check response times for the most common searches.
How to tune Orthanc for a large archive, step by step
This sequence moves a growing Orthanc archive onto a database engine that suits its size, sets storage, search and job limits deliberately, and confirms the result under real load before any decision about object storage. Each step closes with a check you can record.
Confirm current index size and instance count
Record how many DICOM instances, studies and patients the archive holds, how many Orthanc instances read and write it, and how large the SQLite index file is on disk. The Orthanc scalability guidance says the built-in SQLite index should be replaced by an enterprise database engine once the archive reaches several hundred thousand instances, so this count decides whether the move is needed now. Ask your Orthanc administrator or team to pull these figures from the REST API and the file system, and keep them as the baseline for every later comparison. The step is done when you have a dated record of instance count, study count, index size and running instance count.
Move the index to PostgreSQL on SSD
Install the PostgreSQL plugin matching your Orthanc core, provision a PostgreSQL server with the database files on SSD storage, and point Orthanc at it through the configuration file. The Orthanc documentation recommends the PostgreSQL plugin for large datasets, and PostgreSQL itself supports a range of client authentication methods that you should choose deliberately for the Orthanc service account. Run the migration with a copy of the archive, not the only live copy, and keep the SQLite file untouched until validation is complete. The check is a confirmed database connection from every Orthanc instance, with the expected study and instance counts visible through the REST API.
Validate plugin and core versions against release notes
Compare the Orthanc core version, the PostgreSQL plugin version and the PostgreSQL server version against the Orthanc release notes and the PostgreSQL versioning policy before you go live. The current Orthanc release line includes 1.13.0, which the project describes as a rewrite of storage-area access and DICOM parsing and transcoding to improve caching and reduce memory use, so confirm that your plugin version is built for the core you run. Check that your PostgreSQL major version is still within its supported window, because the policy lists end-of-support dates for each release. The check is a written version matrix in your change record with no mismatched components.
Set storage and compression options
Review the storage-area and compression settings in the Orthanc configuration and decide them against your storage layout, backup approach and expected growth. Compression trades CPU time for disk space, so measure the effect on ingest and retrieval on a test copy before you apply it to the production archive. Confirm the storage directory sits on the volume you planned for it and that free space is monitored. Keep configuration changes in version control so each change can be reviewed and reverted. The check is a test archive where ingest, retrieval and deletion all behave as expected with the chosen settings, and the timing results are saved next to the baseline.
Set find limits and review saved jobs and debug settings
Set the limits on how many results a find or query can return so that a single broad search cannot exhaust memory or database capacity, and confirm which clients rely on higher values before you lower them. Review saved jobs, which are the background tasks Orthanc can persist across restarts, to remove stale entries and confirm that long-running tasks have a sensible priority. Disable debug assertions and verbose logging in production unless a specific investigation needs them, because they add overhead and output. Also check that the script execution route and the export route stay disabled, as the Orthanc security guidance recommends. The check is a reviewed configuration file in which each limit has an owner and a stated reason, and a test find that returns the expected truncated result set.
Compare query timing before and after
Run the same set of representative finds, retrievals and job submissions against the SQLite baseline and the PostgreSQL configuration, using identical data and client settings. Record response times, error counts and peak memory and CPU on the Orthanc hosts and the database server. Repeat the runs at several concurrency levels that match your real peak usage, and include at least one run where two Orthanc instances share the database if that is part of your design. The check is a side-by-side table of timings and resource use that shows whether the change improved the workloads that matter to your users, with any regressions investigated before go-live.
Confirm restore of a test archive
Restore a copy of the PostgreSQL index and the matching DICOM storage into a separate environment, then start Orthanc against it and verify that instance, study and patient counts match the source. Check that sample studies open in your viewers and can be retrieved over DICOM and REST. PostgreSQL supports continuous archiving and point-in-time recovery, so confirm that your backup method can restore to a chosen point and that the index and files stay in step. The check is a documented restore run with matching counts and successful retrieval of sample studies, recorded as the basis for your recovery procedure.
Decide whether object storage is needed
Use the measured results and the growth figures from the first step to decide whether DICOM files should move to object storage through a supported plugin, such as the S3, Azure or Google Cloud plugins that the Orthanc project provides. Object storage changes where files live and how they are backed up, so weigh the cost of the storage service, the network path between Orthanc and the bucket, encryption and access controls against the benefit. Ask your partner or internal team for a written estimate covering storage, egress, backup and support, and treat any figure you did not receive in writing as unconfirmed. The check is a signed decision record that states either the reason to keep local storage or the reason and plan to move to object storage.
When to add object storage instead of tuning further
Add object storage when the limit is where the DICOM files live, not how Orthanc uses the disk you already have. Tuning the PostgreSQL index, compression and find limits helps with query speed and database load, but it does not change how much data a single server can hold or where that data sits. Official Orthanc plugins exist for S3, Azure and Google Cloud object storage, so the choice is practical. The three questions to answer are how fast the archive grows, where the data is allowed to reside under your policies, and whether local disk throughput or capacity is actually the bottleneck. Measure those in your own environment before committing: track storage growth per month, disk utilization and read latency during retrieves, and the time to store incoming studies at peak hours.
Object storage adds costs and failure modes that local disk does not have. Each read or write crosses the network, so retrieve latency for viewers and modalities depends on the link between the Orthanc server and the bucket, and that link should be tested under realistic load. Most cloud providers charge for requests and data transfer as well as capacity, so ask any partner or vendor for a cost model based on your study volumes and access pattern, including how often old studies are retrieved. Encryption is your responsibility: confirm which keys protect the objects, who holds them, and whether the storage configuration meets the rules that apply to your patient data. The hardest operational risk is drift between the index and the files. The database must always agree with the bucket, so plan backups and restore tests that cover both together.
Treat the move to object storage as a migration with its own test plan, not a configuration switch. Confirm the plugin version against the Orthanc release you run, and rehearse a restore that brings back the index and the stored objects from the same point in time. Keep local tuning in place, since a faster database and sensible compression still matter with remote storage. For the capacity side of the decision, including storage growth, index size and server sizing from study volumes and retention, use the guidance in the sizing topic of this group before requesting a quote.
Security settings to keep while tuning
Performance changes often touch the same settings that control who can reach an archive. The cards below list the security settings to hold steady while you tune Orthanc for a large archive, so that faster queries and bigger caches do not widen the attack surface.
Keep remote access tied to authentication
By default Orthanc only accepts HTTP connections from localhost. If you enable RemoteAccessAllowed to let other hosts or tools reach the REST API for performance testing or load balancing, the project says AuthenticationEnabled should be true, with users defined in RegisteredUsers. Check this setting in every node of a multi-instance cluster, because a single misconfigured node can expose the shared archive.
Put HTTPS and a reverse proxy in front
If the archive must be reachable from the Internet, the project recommends HTTPS and a reverse proxy rather than exposing the Orthanc port directly. The proxy can also handle TLS termination and request limits, which keeps load-balancing work on the proxy layer. Confirm that the proxy forwards only the routes your users need and that the proxy and Orthanc agree on the same host and port.
Keep script and export routes disabled
The security FAQ warns that the /tools/execute-script route can let a malicious user run any system command, and that the export route can overwrite files. Both should stay disabled. Tuning guides sometimes suggest scripts for cache warming or batch maintenance, so use the REST API or a scheduled job under your own control instead of re-enabling these routes on a production archive.
Protect PostgreSQL with current authentication
The Orthanc index on PostgreSQL holds patient and study metadata, so the database login must be protected as carefully as the archive. PostgreSQL documents password, certificate, GSSAPI, LDAP and OAuth methods, and it has deprecated MD5 password authentication in favor of SCRAM. Confirm that the pg_hba.conf rules allow only the Orthanc hosts, and that the connection uses SCRAM or a certificate method.
Review per-request access with authorization
The advanced authorization plugin forwards each REST request's token to an external web service, which decides access and returns HTTP 403 when access is denied. This adds a check on every call, so measure its latency during tuning. Ask the team to confirm which roles can run bulk queries, large exports or job submissions, and test those roles against the authorization service before raising concurrency limits.
Authorization plugin docsQuestions buyers ask about tuning Orthanc for large archives
How much effort does an Orthanc performance tuning project take, and what drives it?
Effort depends mainly on how many instances, how large the archive is, and how many settings have to change. A tuning project that only moves the index to PostgreSQL on SSD, reviews storage and compression settings, and checks find limits is much smaller than one that also adds several Orthanc nodes, object storage and saved job handling. The Orthanc Book notes that production hospital deployments can hold more than 65 TB of data, 340,000 studies and around 150 million instances, so archive scale changes the testing load considerably. Ask any partner to split the quote into discovery, configuration changes, load testing, and handover, and to state which items are fixed and which depend on measured results.
Can our internal team tune Orthanc without an outside partner?
Yes, many teams can handle the documented settings with in-house engineers, provided someone can read Orthanc and PostgreSQL logs, run load tests, and roll back changes safely. The parts that usually need more experience are multi-instance setups, which require PostgreSQL and plugin versions that support concurrent access, and object storage cut-overs, where index and files must stay in sync. Orthanc Team sells deployment, configuration and development services, so a vendor option also exists. Decide early which skills are missing, then compare the cost of training and on-call coverage against a fixed-scope engagement.
What do we need to give a tuning team before work starts?
A tuning team needs read access to Orthanc and PostgreSQL logs, current configuration files with secrets removed, and recent metrics for CPU, memory, disk latency, and database activity. It also needs a description of the hardware, storage layout, network path to modalities and viewers, and the typical workload, such as daytime query peaks or overnight bulk imports. Access to a non-production copy of the archive or a representative test environment is important, because changes should be measured before they reach clinical systems. Confirm change windows, backup status, and who approves configuration changes in your own environment.
How long does a tuning project take for our archive size?
Duration depends on archive size, number of change areas, and how many test cycles your environment needs. The Orthanc project does not publish a general timeline for tuning, so any figure should come from a written plan based on your inventory and test results. Larger archives usually add time for index migration, longer load tests, and verification of file integrity after storage changes. Ask for the phases, the dependencies between them, and the criteria that close each phase.
What should a quote for Orthanc tuning include?
A useful quote lists the scope in writing: which Orthanc version and plugins are in place, which settings and components will change, and what is out of scope. It should name the environments that will be used for testing, the load tests to run, the acceptance criteria, and the documentation and training delivered at the end. Ask for the assumptions behind the price, such as the number of instances, the storage platform, and whether any PostgreSQL upgrade is included. Separate one-time work from recurring items such as support hours, monitoring, or retainers, and confirm how change requests are priced.
Do we have to migrate to PostgreSQL to tune a large Orthanc archive?
Not always, but the Orthanc project recommends the PostgreSQL plugin for large datasets, and its scalability FAQ says the built-in SQLite index should be replaced by an enterprise database engine once an archive holds several hundred thousand DICOM instances. Migration adds work for data transfer, verification and backup changes, so it should be planned as its own phase. PostgreSQL also has a documented support lifecycle, with version 14 supported to November 12, 2026, so choose a version that will remain supported for your planning horizon. Confirm the plugin version matches your Orthanc release before you start.
Do Orthanc Team support hours change the tuning plan?
They can change the sequence and the handover, but they do not replace testing in your own environment. Orthanc Team sells pre-paid dedicated support hours that are valid for 12 months and are quoted on request, according to its website. Those hours can answer questions about configuration, troubleshooting, or upgrades during the project, which may reduce the time spent waiting on vendor answers. Ask how many hours your plan needs, which tasks they cover, and whether the support hours are used for development or only for consultation.
How DeployOpen scopes and delivers Orthanc tuning
DeployOpen plans, implements and documents Orthanc performance tuning inside your own infrastructure, whether on cloud accounts, data centers or air-gapped networks. We start from your archive's actual size, database platform and access patterns, then agree the tuning changes, tests and handover in writing before work begins.
How we scope
- Review current Orthanc version, database plugin, storage layout and study volumes before proposing any configuration change.
- Agree in writing which settings, PostgreSQL parameters and storage options are in scope for the engagement.
- Define the performance tests, acceptance criteria and environments that will show whether tuning worked.
- Confirm which items are out of scope, such as object storage migration or multi-instance clustering, and price them separately.
How we build
- Prepare PostgreSQL on SSD-backed storage with settings reviewed against your hardware and database size.
- Configure storage, compression, find limits, saved jobs and debug assertions in a version-controlled configuration.
- Test changes on a copy of the archive first, measuring query latency and job throughput before and after each change.
- Document any object storage option evaluated, with the cost and operational trade-offs your team must weigh.
How we hand over
- Deliver a written tuning report listing each setting changed, its reason and the test result that supports it.
- Provide runbooks for applying configuration changes, rolling back and repeating the performance tests later.
- Walk your platform and imaging teams through the configuration and the metrics to watch after go-live.
- Record the Orthanc and PostgreSQL versions tested so upgrades can be checked against the same baseline.
How we support
- Engagements are fixed-scope, so the support boundary is set in the written scope before work starts.
- Ongoing support, upgrades and re-testing after Orthanc or PostgreSQL releases are available as a retainer.
- Retainer scope, response expectations and review cadence are agreed in writing and confirmed with your team.
- Ask for a quote based on your written scope, which covers environments, test effort and handover materials.

