Performance experience using Orthanc 1.3.2 on Ubuntu deployed on AWS

Hello orthanc user group!

I thought I’d share my experience related to system performance of orthanc 1.3.2 running on Ubuntu on AWS. This is not really a question, more to share my experience with the group in case it may help someone else.

The setup:
Orthanc 1.3.2 running on an EC2 t2.micro with Ubuntu 16.04.4 LTS
PostgreSQLindex plugin
RDS PostgreSQL DB service vs local PostgreSQL DB
S3 object store vs EBS volume to store DICOM files
Application ELB in front of Orthanc to perform SSL offload and enable a WAF

I was really after how to optimize the performance on this setup as initially I was seeing quite poor upload and storing speeds for new studies. Therefore, I performance tested all possible constellations of the following setups (in total 4 constellations):

  • PostgreSQL index on local vs RDS service
  • DICOM file storage on EBS volume vs S3 object storage (using S3FS)

The net result of the tests were that the bottleneck was the S3FS driver towards the S3 storage. Upon storing DICOM files (especially when storing a new study or patient) a lot of folder structures need to be created and the files stored inside. Even though S3FS uses local cache for the synchronous operations and thereafter use asynchronous operations for the actual S3 storing, the cache (on local drive) did not seem to cut it for orthanc. The whole process did slow down 3-4 times vs using a dedicated EBS volume for the DICOM storage. This topic should probably be reported as a bug to S3FS as it theoretically should perform just as well as an EBS volume when writing new content.

My tests also found that whether I was using a local PostgreSQL DB or an RDS service, the performance differences were negligible. Clearly the latency to the RDS is good enough for orthanc. I did however always make sure the DB instance was running in the same data centre (availability zone) as the orthanc instance which should keep the latency around 1ms.

Feel free to share you own experience with performance tuning orthanc on the back of this discussion.
Pär

Hi, Pär!

Thank so very much for your email. I’m working on the very same codebase as you are. And this project will also run on AWS in the near future.

I’ve forwarded your email to my manager and we’ll keep an eye on Orthanc’s performance.

Have a good one!

Dear Pär,

Thanks for sharing your insight!

You might be interested by the following new contribution from the Orthanc community:
https://github.com/radpointhq/orthanc-s3-storage

This storage plugin can be used to store the DICOM files into a S3 bucket.

Regards,
Sébastien-