Q&R is exceedingly slow compared to C-STORE

I am a new user of Orthanc, and was surprised when comparing speed differences between Q&R and C-Store: Q&R is at least 10 times slower in my tests. I am wondering if anyone can offer suggestions to improve Q&R performance?

My Orthanc instance runs on a Windows 10 machine (Microsoft Surface Pro 3). Osirix Light runs on a Mac Pro on the same local area network. I first ran a C-STORE test: it took 2 seconds to send a DICOM image from Osirix to Orthanc.

On a second test, I use Orthanc Explorer's "DICOM Query/Retrieve" feature to pull the same DICOM image from Osirix (I removed the image received earlier to make sure my test has a "clean" start). This time it took 20 seconds to receive the same image.

This test is highly repeatable. For larger DICOM image sets, Q&R can easily takes minutes to complete. Considering that my test is done between 2 computers on the same LAN, I am very surprised at the performance. My understanding is that Q&R is C-FIND plus C-STORE. I doubt C-FIND is the culprit (I ran a C-FIND test, which took little time to complete), thus Q&R and C-STORE should have similar speed against the same data set. Did I miss something?

Thanks for any suggestions to improve Q&R performance with Orthanc! Maybe some setting changes with Configuration.json?

Hello,

[...] I first ran a C-STORE test: it took 2 seconds to send a DICOM
image from Osirix to Orthanc.

On a second test, I use Orthanc Explorer's "DICOM Query/Retrieve"
feature to pull the same DICOM image from Osirix (I removed the image
received earlier to make sure my test has a "clean" start). This time
it took 20 seconds to receive the same image.

[...] My understanding is that Q&R is C-FIND plus C-STORE. I doubt C-
FIND is the culprit (I ran a C-FIND test, which took little time to
complete), thus Q&R and C-STORE should have similar speed against the
same data set. Did I miss something?

This is correct. If you have already proven that the C-FIND is not
responsible for the penalty, then I don't think either implementation
(Osirix or Orthanc) is likely to incur any particular overhead for a C-
STORE operation in either direction.

I would therefore look at the hosts. Maybe start with the backing
stores of each: can you test simple file writes and file reads on each
corresponding filesystem, then non-DICOM file transfers? Do try to
monitor system activity (I/O, memory, even CPU) at all times to try and
get a glimpse at a hint of what is going wrong.

Hello Thibault,

Thanks for your reply! After doing lots of research, I think I found the reason of the slowdown, but unfortunately not the fix. Any thoughts would be sincerely appreciated!

When doing C-STORE from the Osirix machine to Orthanc, the transfer syntax was set to Jpeg 2000 Lossless. Although the raw DICOM file’s format is Explicit Little Endian, the actual transfer size is pretty small thanks to Jpeg 2000 compression.

But when doing C-MOVE, Orthanc would ignore any settings I made, and would only receive the DICOM in its original format, thus leading to the dramatic slowdown. Here are a list of setting changes I tried (none works):

  • On the Orthanc side, I modified the transfer syntax setting to the following:
  • “DeflatedTransferSyntaxAccepted” : false,
  • “JpegTransferSyntaxAccepted” : false,
  • “Jpeg2000TransferSyntaxAccepted” : true,
  • “JpegLosslessTransferSyntaxAccepted” : false,
  • “JpipTransferSyntaxAccepted” : false,
  • “Mpeg2TransferSyntaxAccepted” : false,
  • “RleTransferSyntaxAccepted” : false- On the Osirix side, I modified the default “Preferred Syntax” to JPEG 2000 Lossless - Only (used during Q&R Retrieve)
  • On the Osirix side, I modified the DICOM Node settings for Orthanc, changing the Send Syntax to “JPEG 2000 Lossless”.
    I suspect that Orthanc’s Association Negotiation process ignored all the settings, and chooses to use the original DICOM transfer syntax instead. Considering that it takes about 1 minute to transfer a 100 M file in an intranet setting, I felt that there must be a more efficient solution to move files to Orthanc (ideally <10 seconds to transfer a file of 100 M in size). Thanks for your thoughts in advance!

Best regards,
Ishaan