High memory consumption during ingestion of large (1.5 GB) multi-frame instances

Hi everyone,

I have been doing some research regarding Orthanc’s behavior under heavy load, and I have found some unexpected behavior when ingesting large multi-frame instances.

Related issue: Possible Memory Leak with Multiframe DICOM (Orthanc+OHIF)

As already discussed in the related issue, when working with this type of instance Orthanc require a huge amount of memory.

In our context, we have received instances with a size of 1.5 GB, and Orthanc requires 7.1 GB to ingest this instance, with compression. Without compression 5.7 GB.

I’ve done this test with Orthanc 1.12.7 built from source, with the default orthanc.json. I leave the massif information attached. The instance does includes patient information in the pixel data, and I could not find a way to anonymize it, but the issue should be easily reproducible with any instance.

In our infrastructure, allocating 8 GB of RAM to each of our five deployed Orthanc instances is a significant waste of resources, especially since these instances typically only require 300–500 MB for standard operations.

From what we can gather, this behavior occurs because Orthanc loads the instance into memory for every operation: receiving, hashing, compression, etc. Each of these steps appears to use approximately 1.5 GB of RAM concurrently.

Has anyone else found a way to mitigate this, or is there a plan to optimize the streaming/handling of large multi-frame files?

I am available to run more tests or provide additional data if that would be helpful

Cheers!

massif_withoutcompression.out.46778.txt (244.8 KB)

massif_withcompression.out.50187.txt (234.0 KB)

Hi @vicholp

There are very long term plans to work on “streaming” to minimize Orthanc usage when possible.

However, this requires hundreds of hours of work and I’m not sure we’ll find someone to fund these developments :wink:

Best,

Alain.

 

 


If you find this software and the support helpful, consider making a donation to support the project’s continued development — every contribution makes a difference!