Hello,
Measuring actual memory consumption of a process in Linux is tricky, as explained in the following thread:
http://stackoverflow.com/questions/131303/how-to-measure-actual-memory-usage-of-an-application-or-process
I assume you read the “VIRT” field returned by the standard “top” command to figure out the RAM used by Orthanc. This information is roughly the same as the “VmSize” field contained in the “/proc/{…}/status” file. Here is what I get for an instance of Orthanc running inside Docker:
ps -elf | grep Orthanc
4 S root 7225 2144 0 80 0 - 683095 hrtime 21:02 ? 00:00:01 Orthanc /etc/orthanc/
cat /proc/7225/status | grep VmSize
VmSize: 2732380 kB
This is close to the 2.8GB you reported. Running Orthanc outside Docker only slightly reduce this amount (down to 2.6GB).
However, this “VmSize” is the total amount of memory required by the program. This means that this amount sums up the code of the software together with the data handled by the software, that some of this memory might be shared by several processes (several instances of Orthanc will use the same code), and that some of this memory might be swapped out of the RAM to the disk by the kernel. In summary, this “VmSize” does not provide meaningful information about the RAM usage of the process. You should instead look at the “VmRSS” field (same as the “RES” column reported in “top”), which is the RAM actually consumed in the system by your process (“RSS” means “Resident Set Size”, i.e. the amount actually in memory right now):
cat /proc/7225/status | grep VmRSS
VmRSS: 34472 kB
So, Orthanc (either inside or outside Docker) only uses about 34MB of RAM on my system. This is most probably also your case.
When Orthanc handles DICOM files, it will load them into RAM. In typical scenarios, each single DICOM file will weight less than 10MB: You could therefore expect the memory consumption to stay below several hundreds of MB.
To put things into perspective, the demo server of the Orthanc project runs on a 1-core CPU with 2GB of RAM. And this is sufficient to run 5 instances of Orthanc. As another illustration, Orthanc runs fine on Raspberry Pi:
http://www.web3.lu/orthanc-raspberry-pi/
So, except if you are in a very high-demanding scenario, almost any host machine should be OK to host 3 instances of Orthanc. Just give a try, then possibly scale up the system.
HTH,
Sébastien-