changeset 6971:f8b713a8f9b4 streaming

documentation of new configurations -> to be discussed with Seb
author Alain Mazy <am@orthanc.team>
date Tue, 30 Jun 2026 11:02:55 +0200
parents 89d31235fff6
children 8c303fedfe87 0865c7118efa
files OrthancServer/Resources/Configuration.json OrthancServer/Sources/OrthancConfiguration.h OrthancServer/Sources/ServerContext.cpp
diffstat 3 files changed, 86 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Resources/Configuration.json	Mon Jun 29 18:36:35 2026 +0200
+++ b/OrthancServer/Resources/Configuration.json	Tue Jun 30 11:02:55 2026 +0200
@@ -64,14 +64,22 @@
   // is disabled.  (new in Orthanc 1.10.0)
   "MaximumStorageCacheSize" : 128,
 
-  // Amount of RAM that are allocated to the storage loader threads.
+  // Amount of RAM (in MB) that are allocated to the storage loader threads.
   // Note that this limit can be overpassed when a single file 
   // exceeds this size.
-  // (new in Orthanc 1.12.11+)
-  "StorageMemoryCapacity": 256,
+  // (new in Orthanc 1.12.11+).
+  // You should monitor the "orthanc_storage_memory_usage_mb" and
+  // "orthanc_storage_memory_max_usage_mb" metrics to determine the 
+  // optimal value for your setup. 
+  "StorageMemoryCapacity": 512,
 
   // Number of threads that are used to read files from the storage.
   // (new in Orthanc 1.12.11+)
+  // A value > 4 is meaningful only if the storage is a distributed 
+  // network storage (e.g., object storage plugin).  In this case,
+  // you can typically increase it to 20 and you should then monitor 
+  // the "orthanc_storage_available_threads" metrics to determine 
+  // the optimal value for your setup.
   "StorageLoaderThreads": 4,
 
   // List of paths to the custom Lua scripts that are to be loaded
@@ -1145,5 +1153,74 @@
   // might be assigned to different patients because there is no
   // centralized patient ID management. (new in Orthanc 1.12.11)
   // Warning: As of 1.12.11, this is an experimental configuration.
-  "PatientLevelEnabled": true
+  "PatientLevelEnabled": true,
+
+
+
+  // Number of threads that are used to parse DICOM files (when you need
+  // to access the value of DICOM tags that are not store in DB).
+  // (new in Orthanc 1.12.11+)
+  // You should monitor the "orthanc_dicom_parser_available_threads" 
+  // metrics to determine the optimal value for your setup and usage.
+  "DicomParserThreads": 2,
+
+  // Amount of RAM (in MB) that are allocated to the DICOM parser threads.
+  // Note that this limit can be overpassed when a single file 
+  // exceeds this size.
+  // (new in Orthanc 1.12.11+).
+  // You should monitor the "orthanc_dicom_parser_memory_usage_mb" and
+  // "orthanc_dicom_parser_memory_max_usage_mb" metrics to determine the 
+  // optimal value for your setup and usage. 
+  "DicomParserMemoryCapacity": 256,
+
+  // Maximum size of the DICOM parser cache in MB.  This cache
+  // is stored in RAM and contains a parsed version of recently read
+  // DIOCM files.  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.12.11+)
+  "DicomParserCacheSize" : 128,
+
+  // Number of threads that are used to parse transcode DICOM files.
+  // (new in Orthanc 1.12.11+)
+  // You should monitor the "orthanc_transcoder_available_threads" 
+  // metrics to determine the optimal value for your setup and usage.
+  "TranscoderThreads": 4,
+
+  // Amount of RAM (in MB) that are allocated to the transcoder threads.
+  // Note that this limit can be overpassed when a single file 
+  // exceeds this size.
+  // (new in Orthanc 1.12.11+).
+  // You should monitor the "orthanc_transcoder_memory_usage_mb" and
+  // "orthanc_transcoder_memory_max_usage_mb" metrics to determine the 
+  // optimal value for your setup and usage. 
+  "TranscoderMemoryCapacity": 256,
+
+  // Maximum size of the transcoder cache in MB.  This cache
+  // is stored in RAM and contains transcoded versions of recently read
+  // DIOCM files.  A value of "0" indicates the cache
+  // is disabled.  (new in Orthanc 1.12.11+)
+  "TranscoderCacheSize" : 128,
+
+  // Number of threads that are used to provide DICOM files sequentially
+  // (currently used in Archive jobs, C-Store and C-Get).  This limits
+  // the number of concurrent such jobs.
+  // TODO-Streaming: clarify the meaning with Seb.  If the above definition
+  // is correct; shouldn't we simply set it to the same value as "ConcurrentJobs" if not defined ?
+  // (new in Orthanc 1.12.11+)
+  // You should monitor the "orthanc_seq_reader_available_threads" 
+  // metrics to determine the optimal value for your setup and usage.
+  "SequentialDicomReaderThreads": 2,
+
+  // TODO-Streaming: clarify the meaning with Seb.
+  // Number of files each sequential DICOM reader is allowed to buffer
+  // in advance before it is consumed by the related job.
+  "SequentialDicomReaderWindowSize": 4,
+  
+  // TODO-Streaming: clarify the meaning with Seb.
+  // Amount of RAM (in MB) that are allocated to each sequential DICOM
+  // Reader.
+  // Note that this limit can be overpassed when a single file 
+  // exceeds this size.
+  // (new in Orthanc 1.12.11+).
+  "SequentialDicomReaderWindowCapacity": 64
+
 }
--- a/OrthancServer/Sources/OrthancConfiguration.h	Mon Jun 29 18:36:35 2026 +0200
+++ b/OrthancServer/Sources/OrthancConfiguration.h	Tue Jun 30 11:02:55 2026 +0200
@@ -57,6 +57,7 @@
 #define ORTHANC_CONFIG_HTTP_THREADS_COUNT "HttpThreadsCount"
 #define ORTHANC_CONFIG_DICOM_THREADS_COUNT "DicomThreadsCount"
 
+// TODO-Streaming: finalize the names with Seb
 #define ORTHANC_CONFIG_STORAGE_LOADER_THREADS "StorageLoaderThreads"
 #define ORTHANC_CONFIG_STORAGE_MEMORY_CAPACITY "StorageMemoryCapacity"
 #define ORTHANC_CONFIG_MAXIMUM_STORAGE_CACHE_SIZE "MaximumStorageCacheSize"  // TODO-Streaming: we keep the old naming for historical reasons ?
--- a/OrthancServer/Sources/ServerContext.cpp	Mon Jun 29 18:36:35 2026 +0200
+++ b/OrthancServer/Sources/ServerContext.cpp	Tue Jun 30 11:02:55 2026 +0200
@@ -724,6 +724,7 @@
           LOG(WARNING) << "'" << ORTHANC_CONFIG_STORAGE_LOADER_THREADS << "' is set to " << storageLoaderThreads;
         }
 
+        // ----> IF you update values here, you must also update them in Configuration.json <-----
         transcoderThreads = lock.GetConfiguration().GetUnsignedIntegerParameter(ORTHANC_CONFIG_TRANSCODER_THREADS, 4);
         LOG(WARNING) << "'" << ORTHANC_CONFIG_TRANSCODER_THREADS << "' is set to " << transcoderThreads;
 
@@ -733,11 +734,12 @@
         sequentialReaderThreads = lock.GetConfiguration().GetUnsignedIntegerParameter(ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_THREADS, 2);
         LOG(WARNING) << "'" << ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_THREADS << "' is set to " << sequentialReaderThreads;
 
+        // ----> IF you update values here, you must also update them in Configuration.json <-----
         GetMemoryConfiguration(storageMemoryCapacityMb, lock, ORTHANC_CONFIG_STORAGE_MEMORY_CAPACITY, 512);
         GetMemoryConfiguration(dicomParserMemoryCapacityMb, lock, ORTHANC_CONFIG_DICOM_PARSER_MEMORY_CAPACITY, 256);
-        GetMemoryConfiguration(dicomParserCacheSizeMb, lock, ORTHANC_CONFIG_DICOM_PARSER_CACHE_SIZE, 256);
+        GetMemoryConfiguration(dicomParserCacheSizeMb, lock, ORTHANC_CONFIG_DICOM_PARSER_CACHE_SIZE, 128);
         GetMemoryConfiguration(transcoderMemoryCapacityMb, lock, ORTHANC_CONFIG_TRANSCODER_MEMORY_CAPACITY, 256);
-        GetMemoryConfiguration(transcoderCacheSizeMb, lock, ORTHANC_CONFIG_TRANSCODER_CACHE_SIZE, 256);
+        GetMemoryConfiguration(transcoderCacheSizeMb, lock, ORTHANC_CONFIG_TRANSCODER_CACHE_SIZE, 128);
         GetMemoryConfiguration(sequentialReaderWindowCapacityMb, lock, ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_WINDOW_CAPACITY, 64);
 
         sequentialReaderWindowSize = lock.GetConfiguration().GetUnsignedIntegerParameter(ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_WINDOW_SIZE, 4);