Slow c-find -works ok with rest/curl

Hello,
I would appreciate if someone can help with the below:

a)Orthanc works very slow with c-find compared with dcm4chee.
it works ok with rest/curl for the same queries.

radiant doing cfind, is on the same machine as orthanc.
orthanc is running with mysql database in a raid/ enterprise ssd disks. (7TB of data)

1.when there are a lot of exams in a particular day e.g 60, it takes a few seconds to show the exams (compared with dcm4che)

2.when searching for a particular PatientID it takes some time.

3.when looking for a date-range so the results are more than 100results, it takes time.

attached is the dicom log in verbose, for further investigation in a particular scenario when searching for a particular PatientId using radiant.

thank you,

radiant c find - Copy.txt (19.9 KB)

Hello,

The MySQL databases are not as optimized as the PostgreSQL databases, as explained in our scalability FAQ:
https://book.orthanc-server.com/faq/scalability.html#recommended-setup-for-best-performance

Could you give a try with PostgreSQL?

Sébastien-

image.png

In your logs, C-Find takes between 500 and 800ms which is not super efficient but not that bad.
BTW, 90% of this time is spent in the MySQL server itself so, not much we can improve on Orthanc’s side…

Might be worth sharing other logs with more results…

I’m having the same problem, slow response when querying from radiant. I wanted to check the log files and used this command " Orthanc-1.9.7-Release.exe --verbose Configuration.json > Orthanc.log 2<&1" I’m using postgres database but this command starts the sqlite database instead of the postgres. I’ve tried putting the postgres config file together in the folder but still same result. How do I start orthanc verbose with postgres?? Thank you.

Hi Walid,

I’ve slightly updated the procedure in the orthanc book in order to restart Orthanc with exactly the same configuration as your service. The trick is to provide the whole configuration folder instead of a single file:

  1. Stop the Orthanc service. The actual process depends on your version of Windows.

  2. Make sure you have a C:\Temp folder available to store the log file.

  3. In a command-line shell, manually start Orthanc to generate the Orthanc.log file:

    $ "C:\Program Files\Orthanc Server\Orthanc.exe" --verbose "C:\Program Files\Orthanc Server\Configuration" > C:\Temp\Orthanc.log 2<&1
    
    

    This will start Orthanc with exactly the same configuration as your service, but in verbose mode.

  4. Once the log has been generated (in C:\Temp\Orthanc.log), stop Orthanc and possibly restart the Orthanc service.

HTH,

Alain.

Thank you, it worked.

Dear,
are there any updates on the above issue? - cFind with radiant is slow with ORTHANC.(it works ok with restapi).
any updates that we can do on the configuration file that forces the database to add details that are required (maybe that now are not indexed), and are requested during cFind ?

thank you,

Hi Daniel,

Nothing really new on this side. PostgreSQL is still better optimized than the MySQL plugin.
C-Find and tools/find should have similar performances since they are basically doing the same kind of DB accesses. If not the case, you should try to compare both requests to check that they are equivalent.

Best regards,

Alain

we understand the protgresql is better but,
still the UI search,listing etc is very fast but cFIND with dicom viewers very slow.

does it have to do with extra dicom tags?
anything that can help to index in order to make it work faster ?

// Extra Main Dicom tags that are stored in DB together with all default
// Main Dicom tags that are already stored (TODO: see book new page).
// (new in Orthanc 1.11.0)
// Sequences tags are not supported.
/**
“ExtraMainDicomTags” : {
“Instance” : [
“Rows”,
“Columns”,
“ImageType”,
“SOPClassUID”,
“ContentDate”,
“ContentTime”,
“FrameOfReferenceUID”,
“PixelSpacing”,
“SpecificCharacterSet”,
“BitsAllocated”
],
“Series” : [],
“Study”: [],
“Patient”: []
},

As mentioned in the previous message, you should compare the C-Find requests issued by the viewer and the tools/find performed in the UI to have a better understanding.

Feel free to share the info here.