Mercurial > hg > orthanc
changeset 7087:bd182516e363 streaming
decrease verbosity of performance options with a constant default value
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Thu, 13 Aug 2026 08:41:47 +0000 |
| parents | dbe83600164c |
| children | 3f7ca7c4b2c7 |
| files | OrthancServer/Resources/AdvancedConfiguration.json OrthancServer/Sources/ServerContext.cpp |
| diffstat | 2 files changed, 42 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Resources/AdvancedConfiguration.json Thu Aug 13 08:29:38 2026 +0000 +++ b/OrthancServer/Resources/AdvancedConfiguration.json Thu Aug 13 08:41:47 2026 +0000 @@ -352,8 +352,8 @@ "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 - // when a single file exceeds this size. You should monitor the + // parsing the DICOM files. Note that this limit can be overpassed + // when a single file exceeds this size. 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. (new in Orthanc 1.13.0) @@ -361,39 +361,38 @@ // 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. + // DICOM files. A value of "0" indicates the cache is disabled. // (new in Orthanc 1.13.0) - "DicomParserCacheSize" : 128, + "DicomParserCacheSize" : 256, - // Number of threads that are used to parse transcode DICOM files. - // (new in Orthanc 1.13.0) - // You should monitor the "orthanc_transcoder_available_threads" - // metrics to determine the optimal value for your setup. + // Number of threads that are used to transcode DICOM files. You + // should monitor the "orthanc_transcoder_available_threads" metrics + // to determine the optimal value for your setup. (new in Orthanc 1.13.0) "TranscoderThreadsCount" : 4, // Peak amount of RAM (in MB) that can be allocated by the threads - // transcoding DICOM instances. Note that this limit can be - // overpassed when a single instance exceeds this size. You should + // transcoding DICOM instances. Note that this limit can be + // overpassed when a single instance exceeds this size. 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. (new in Orthanc 1.13.0) "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.13.0) - "TranscoderCacheSize" : 128, + // Maximum size of the transcoder cache in MB. This cache is stored + // in RAM and contains transcoded versions of recently read DICOM + // files. A value of "0" indicates the cache is disabled. (new in + // Orthanc 1.13.0) + "TranscoderCacheSize" : 256, - // Total number of threads that are used to provide DICOM files sequentially - // (currently used in Archive jobs, C-Store and C-Get). - // 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 - // "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. + // Total number of threads that are used to provide DICOM files + // sequentially (currently used in Archive jobs, C-Store and C-Get). + // 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 "StorageLoaderThreadsCount". You + // should monitor the "orthanc_seq_reader_available_threads" metrics + // to determine the optimal value for your setup and usage. (new in + // Orthanc 1.13.0) // "SequentialDicomReaderThreadsCount" : 4, // Number of files each sequential DICOM reader is allowed to buffer @@ -404,15 +403,14 @@ // "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 "LoaderThreadsCount". + // By default, the value of this configuration is the same as "LoaderThreadsCount". (new in Orthanc 1.13.0) // "SequentialDicomReaderWindowSize" : 4, - // Amount of RAM (in MB) that are allocated to each sequential DICOM - // Reader. The sequential DICOM reader stops pauses buffering as soon - // as one of the "SequentialDicomReaderWindowSize" or - // "SequentialDicomReaderWindowCapacity" limit is reached. - // Note that this limit can be overpassed when a single file - // exceeds this size. - // (new in Orthanc 1.13.0) + // Peak amount of RAM (in MB) that can be allocated by each + // sequential DICOM reader. The sequential DICOM reader stops pauses + // buffering as soon as one of the "SequentialDicomReaderWindowSize" + // or "SequentialDicomReaderWindowCapacity" limit is reached. Note + // that this limit can be overpassed when a single file exceeds this + // size. (new in Orthanc 1.13.0) "SequentialDicomReaderWindowCapacity" : 64 }
--- a/OrthancServer/Sources/ServerContext.cpp Thu Aug 13 08:29:38 2026 +0000 +++ b/OrthancServer/Sources/ServerContext.cpp Thu Aug 13 08:41:47 2026 +0000 @@ -511,7 +511,7 @@ } else { - LOG(WARNING) << "Performance option \"" << parameter << "\" is set to " << mb << "MB"; + LOG(INFO) << "Performance option \"" << parameter << "\" is set to " << mb << "MB"; } result = static_cast<uint64_t>(mb) * MEGABYTE; @@ -705,8 +705,6 @@ { OrthancConfiguration::ReaderLock lock; - unsigned int loaderThreads = lock.GetConfiguration().GetLoaderThreads(); - unsigned int concurrentJobs = lock.GetConfiguration().GetConcurrentJobs(); GetMemorySizeConfiguration(storageCacheSize, lock, ORTHANC_CONFIG_MAXIMUM_STORAGE_CACHE_SIZE); @@ -717,6 +715,9 @@ if (!lock.GetConfiguration().LookupUnsignedIntegerParameter(storageLoaderThreads, ORTHANC_CONFIG_STORAGE_LOADER_THREADS_COUNT)) { + const unsigned int loaderThreads = lock.GetConfiguration().GetLoaderThreads(); + const unsigned int concurrentJobs = lock.GetConfiguration().GetConcurrentJobs(); + storageLoaderThreads = loaderThreads * concurrentJobs; if (storageLoaderThreads < 4) { @@ -736,14 +737,14 @@ } else { - LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_STORAGE_LOADER_THREADS_COUNT << "\" is set to " << storageLoaderThreads; + LOG(INFO) << "Performance option \"" << ORTHANC_CONFIG_STORAGE_LOADER_THREADS_COUNT << "\" is set to " << storageLoaderThreads; } transcoderThreads = lock.GetConfiguration().GetUnsignedIntegerParameter(ORTHANC_CONFIG_TRANSCODER_THREADS_COUNT); - LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_TRANSCODER_THREADS_COUNT << "\" is set to " << transcoderThreads; + LOG(INFO) << "Performance option \"" << ORTHANC_CONFIG_TRANSCODER_THREADS_COUNT << "\" is set to " << transcoderThreads; 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; + LOG(INFO) << "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); @@ -761,12 +762,13 @@ } else { - LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_THREADS_COUNT - << "\" is set to " << sequentialReaderThreads; + LOG(INFO) << "Performance option \"" << ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_THREADS_COUNT + << "\" is set to " << sequentialReaderThreads; } if (!lock.GetConfiguration().LookupUnsignedIntegerParameter(sequentialReaderWindowSize, ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_WINDOW_SIZE)) { + const unsigned int loaderThreads = lock.GetConfiguration().GetLoaderThreads(); LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_WINDOW_SIZE << "\" is not defined in your configuration, setting it to the same value as \"" << ORTHANC_CONFIG_LOADER_THREADS << "\": " << loaderThreads; @@ -774,8 +776,8 @@ } else { - LOG(WARNING) << "Performance option \"" << ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_WINDOW_SIZE - << "\" is set to " << sequentialReaderWindowSize; + LOG(INFO) << "Performance option \"" << ORTHANC_CONFIG_SEQUENTIAL_DICOM_READER_WINDOW_SIZE + << "\" is set to " << sequentialReaderWindowSize; } }
