changeset 7086:dbe83600164c streaming

suffixing with "Count" the new options indicating a number of threads
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 13 Aug 2026 08:29:38 +0000
parents 7dfb6d1ff9b1
children bd182516e363
files OrthancServer/Resources/AdvancedConfiguration.json OrthancServer/Resources/Configuration.json OrthancServer/Sources/OrthancConfiguration.h OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp OrthancServer/Sources/ServerContext.cpp
diffstat 5 files changed, 28 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Resources/AdvancedConfiguration.json	Thu Aug 13 07:59:45 2026 +0000
+++ b/OrthancServer/Resources/AdvancedConfiguration.json	Thu Aug 13 08:29:38 2026 +0000
@@ -349,7 +349,7 @@
   // You should monitor the "orthanc_dicom_parser_available_threads"
   // metrics to determine the optimal value for your setup. (new in
   // Orthanc 1.13.0)
-  "DicomParserThreads" : 2,
+  "DicomParserThreadsCount" : 2,
 
   // Peak amount of RAM (in MB) that can be allocated by the threads
   // parsing the DICOM files.  Note that this limit can be overpassed
@@ -369,7 +369,7 @@
   // (new in Orthanc 1.13.0)
   // You should monitor the "orthanc_transcoder_available_threads"
   // metrics to determine the optimal value for your setup.
-  "TranscoderThreads" : 4,
+  "TranscoderThreadsCount" : 4,
 
   // Peak amount of RAM (in MB) that can be allocated by the threads
   // transcoding DICOM instances.  Note that this limit can be
@@ -390,21 +390,21 @@
   // Each time such a job needs to get a DICOM file content, it requests it from
   // a sequential DICOM reader that will itself use a s torage loader thread.
   // Therefore, by default, the value of this configuration is identical to
-  // "StorageLoaderThreads".
+  // "StorageLoaderThreadsCount".
   // (new in Orthanc 1.13.0)
   // You should monitor the "orthanc_seq_reader_available_threads"
   // metrics to determine the optimal value for your setup and usage.
-  // "SequentialDicomReaderThreads" : 4,
+  // "SequentialDicomReaderThreadsCount" : 4,
 
   // Number of files each sequential DICOM reader is allowed to buffer
   // in advance before it is consumed by the related job.
   // This is kind of equivalent to the older "LoaderThreads" configuration
-  // but, furthermore, you must make sure that there are enough "StorageLoaderThreads"
-  // and "SequentialDicomReaderThreads" for each job ->
-  // "StorageLoaderThreads" should be larger than "ConcurrentJobs" * "SequentialDicomReaderWindowSize"
+  // but, furthermore, you must make sure that there are enough "StorageLoaderThreadsCount"
+  // and "SequentialDicomReaderThreadsCount" for each job ->
+  // "StorageLoaderThreadsCount" should be larger than "ConcurrentJobs" * "SequentialDicomReaderWindowSize"
   // Together with "SequentialDicomReaderWindowCapacity", this also defines the amount of memory that is
   // used by each job that required a SequentialDicomReader.
-  // By default, the value of this configuration is the same as "LoaderThreads".
+  // By default, the value of this configuration is the same as "LoaderThreadsCount".
   // "SequentialDicomReaderWindowSize" : 4,
 
   // Amount of RAM (in MB) that are allocated to each sequential DICOM
--- a/OrthancServer/Resources/Configuration.json	Thu Aug 13 07:59:45 2026 +0000
+++ b/OrthancServer/Resources/Configuration.json	Thu Aug 13 08:29:38 2026 +0000
@@ -58,7 +58,7 @@
   // 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. (new in Orthanc 1.13.0)
-  "StorageLoaderThreads" : 4,
+  "StorageLoaderThreadsCount" : 4,
 
   // Peak amount of RAM (in MB) that can be allocated by the threads
   // loading from the storage area. Note that this limit can be
--- a/OrthancServer/Sources/OrthancConfiguration.h	Thu Aug 13 07:59:45 2026 +0000
+++ b/OrthancServer/Sources/OrthancConfiguration.h	Thu Aug 13 08:29:38 2026 +0000
@@ -62,16 +62,16 @@
 #define ORTHANC_CONFIG_ZIP_LOADER_THREADS "ZipLoaderThreads"   // for backward compatibility only
 
 
-#define ORTHANC_CONFIG_STORAGE_LOADER_THREADS "StorageLoaderThreads"
+#define ORTHANC_CONFIG_STORAGE_LOADER_THREADS_COUNT "StorageLoaderThreadsCount"
 #define ORTHANC_CONFIG_STORAGE_MEMORY_CAPACITY "StorageMemoryCapacity"
 #define ORTHANC_CONFIG_MAXIMUM_STORAGE_CACHE_SIZE "MaximumStorageCacheSize"
-#define ORTHANC_CONFIG_DICOM_PARSER_SOURCE_THREADS "DicomParserThreads"
+#define ORTHANC_CONFIG_DICOM_PARSER_SOURCE_THREADS_COUNT "DicomParserThreadsCount"
 #define ORTHANC_CONFIG_DICOM_PARSER_MEMORY_CAPACITY "DicomParserMemoryCapacity"
 #define ORTHANC_CONFIG_DICOM_PARSER_CACHE_SIZE "DicomParserCacheSize"
-#define ORTHANC_CONFIG_TRANSCODER_THREADS "TranscoderThreads"
+#define ORTHANC_CONFIG_TRANSCODER_THREADS_COUNT "TranscoderThreadsCount"
 #define ORTHANC_CONFIG_TRANSCODER_MEMORY_CAPACITY "TranscoderMemoryCapacity"
 #define ORTHANC_CONFIG_TRANSCODER_CACHE_SIZE "TranscoderCacheSize"
-#define ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_THREADS "SequentialDicomReaderThreads"
+#define ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_THREADS_COUNT "SequentialDicomReaderThreadsCount"
 #define ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_WINDOW_SIZE "SequentialDicomReaderWindowSize"
 #define ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_WINDOW_CAPACITY "SequentialDicomReaderWindowCapacity"
 
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp	Thu Aug 13 07:59:45 2026 +0000
+++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp	Thu Aug 13 08:29:38 2026 +0000
@@ -207,13 +207,13 @@
 
       performance[ORTHANC_CONFIG_DICOM_PARSER_CACHE_SIZE] = BytesToMegabytes(dicomParserMemoryCache);
       performance[ORTHANC_CONFIG_DICOM_PARSER_MEMORY_CAPACITY] = BytesToMegabytes(dicomParserMemoryCapacity);
-      performance[ORTHANC_CONFIG_DICOM_PARSER_SOURCE_THREADS] = dicomParserThreadsCount;
+      performance[ORTHANC_CONFIG_DICOM_PARSER_SOURCE_THREADS_COUNT] = dicomParserThreadsCount;
       performance[ORTHANC_CONFIG_MAXIMUM_STORAGE_CACHE_SIZE] = BytesToMegabytes(storageMemoryCache);
-      performance[ORTHANC_CONFIG_STORAGE_LOADER_THREADS] = storageReaderThreadsCount;
+      performance[ORTHANC_CONFIG_STORAGE_LOADER_THREADS_COUNT] = storageReaderThreadsCount;
       performance[ORTHANC_CONFIG_STORAGE_MEMORY_CAPACITY] = BytesToMegabytes(storageMemoryCapacity);
       performance[ORTHANC_CONFIG_TRANSCODER_CACHE_SIZE] = BytesToMegabytes(transcoderMemoryCache);
       performance[ORTHANC_CONFIG_TRANSCODER_MEMORY_CAPACITY] = BytesToMegabytes(transcoderMemoryCapacity);
-      performance[ORTHANC_CONFIG_TRANSCODER_THREADS] = transcoderReaderThreadsCount;
+      performance[ORTHANC_CONFIG_TRANSCODER_THREADS_COUNT] = transcoderReaderThreadsCount;
     }
 
     result[PERFORMANCE] = performance;
--- a/OrthancServer/Sources/ServerContext.cpp	Thu Aug 13 07:59:45 2026 +0000
+++ b/OrthancServer/Sources/ServerContext.cpp	Thu Aug 13 08:29:38 2026 +0000
@@ -715,20 +715,20 @@
           LOG(WARNING) << "Storage cache is disabled";
         }
 
-        if (!lock.GetConfiguration().LookupUnsignedIntegerParameter(storageLoaderThreads, ORTHANC_CONFIG_STORAGE_LOADER_THREADS))
+        if (!lock.GetConfiguration().LookupUnsignedIntegerParameter(storageLoaderThreads, ORTHANC_CONFIG_STORAGE_LOADER_THREADS_COUNT))
         {
           storageLoaderThreads = loaderThreads * concurrentJobs;
           if (storageLoaderThreads < 4)
           {
             storageLoaderThreads = 4;
-            LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_STORAGE_LOADER_THREADS
+            LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_STORAGE_LOADER_THREADS_COUNT
                          << "\" is not defined in your configuration, setting it to " << storageLoaderThreads;
           }
           else
           {
             static const unsigned int CAP = 50;
             storageLoaderThreads = std::min(CAP, storageLoaderThreads);
-            LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_STORAGE_LOADER_THREADS
+            LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_STORAGE_LOADER_THREADS_COUNT
                          << "\" is not defined in your configuration, setting it to " << storageLoaderThreads
                          << ", based on the \"" << ORTHANC_CONFIG_CONCURRENT_JOBS << "\" and the \""
                          << ORTHANC_CONFIG_LOADER_THREADS << "\" options capped at " << CAP;
@@ -736,14 +736,14 @@
         }
         else
         {
-          LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_STORAGE_LOADER_THREADS << "\" is set to " << storageLoaderThreads;
+          LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_STORAGE_LOADER_THREADS_COUNT << "\" is set to " << storageLoaderThreads;
         }
 
-        transcoderThreads = lock.GetConfiguration().GetUnsignedIntegerParameter(ORTHANC_CONFIG_TRANSCODER_THREADS);
-        LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_TRANSCODER_THREADS << "\" is set to " << transcoderThreads;
+        transcoderThreads = lock.GetConfiguration().GetUnsignedIntegerParameter(ORTHANC_CONFIG_TRANSCODER_THREADS_COUNT);
+        LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_TRANSCODER_THREADS_COUNT << "\" is set to " << transcoderThreads;
 
-        dicomParserThreads = lock.GetConfiguration().GetUnsignedIntegerParameter(ORTHANC_CONFIG_DICOM_PARSER_SOURCE_THREADS);
-        LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_DICOM_PARSER_SOURCE_THREADS << "\" is set to " << dicomParserThreads;
+        dicomParserThreads = lock.GetConfiguration().GetUnsignedIntegerParameter(ORTHANC_CONFIG_DICOM_PARSER_SOURCE_THREADS_COUNT);
+        LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_DICOM_PARSER_SOURCE_THREADS_COUNT << "\" is set to " << dicomParserThreads;
 
         GetMemorySizeConfiguration(storageMemoryCapacity, lock, ORTHANC_CONFIG_STORAGE_MEMORY_CAPACITY);
         GetMemorySizeConfiguration(dicomParserMemoryCapacity, lock, ORTHANC_CONFIG_DICOM_PARSER_MEMORY_CAPACITY);
@@ -752,16 +752,16 @@
         GetMemorySizeConfiguration(transcoderCacheSize, lock, ORTHANC_CONFIG_TRANSCODER_CACHE_SIZE);
         GetMemorySizeConfiguration(sequentialReaderWindowCapacity, lock, ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_WINDOW_CAPACITY);
 
-        if (!lock.GetConfiguration().LookupUnsignedIntegerParameter(sequentialReaderThreads, ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_THREADS))
+        if (!lock.GetConfiguration().LookupUnsignedIntegerParameter(sequentialReaderThreads, ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_THREADS_COUNT))
         {
-          LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_THREADS
+          LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_THREADS_COUNT
                        << "\" is not defined in your configuration, setting it to the same value as \""
-                       << ORTHANC_CONFIG_STORAGE_LOADER_THREADS << "\": " << storageLoaderThreads;
+                       << ORTHANC_CONFIG_STORAGE_LOADER_THREADS_COUNT << "\": " << storageLoaderThreads;
           sequentialReaderThreads = storageLoaderThreads;
         }
         else
         {
-          LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_THREADS
+          LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_THREADS_COUNT
                        << "\" is set to " << sequentialReaderThreads;
         }