Mercurial > hg > orthanc
changeset 7071:09528940289e streaming
clarifications
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Wed, 12 Aug 2026 11:38:36 +0200 |
| parents | b808c2f5bb0d |
| children | c762f878e1f7 |
| files | OrthancServer/Resources/Configuration.json OrthancServer/Sources/OrthancConfiguration.h OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp OrthancServer/Sources/ServerContext.cpp OrthancServer/Sources/ServerContext.h |
| diffstat | 5 files changed, 44 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Resources/Configuration.json Wed Aug 12 10:07:40 2026 +0200 +++ b/OrthancServer/Resources/Configuration.json Wed Aug 12 11:38:36 2026 +0200 @@ -52,22 +52,20 @@ // is disabled. (new in Orthanc 1.10.0) "MaximumStorageCacheSize" : 128, - // 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.13.0). - // You should monitor the "orthanc_storage_memory_usage_mb" and + // Amount of RAM (in MB) that is allocated to the threads loading + // from the storage area. Note that this limit can be overpassed + // when a single file exceeds this size. 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. + // optimal value for your setup. (new in Orthanc 1.13.0) "StorageMemoryCapacity" : 512, // Number of threads that are used to read files from the storage. - // (new in Orthanc 1.13.0) // 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. + // 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. (new in Orthanc 1.13.0) "StorageLoaderThreads" : 4, // List of paths to the custom Lua scripts that are to be loaded
--- a/OrthancServer/Sources/OrthancConfiguration.h Wed Aug 12 10:07:40 2026 +0200 +++ b/OrthancServer/Sources/OrthancConfiguration.h Wed Aug 12 11:38:36 2026 +0200 @@ -214,22 +214,26 @@ bool LookupStringParameter(std::string& target, const std::string& parameter) const; + // If the parameter is not part of the user configuration, it it retrieved from the default configuration std::string GetStringParameter(const std::string& parameter) const; bool LookupIntegerParameter(int& target, const std::string& parameter) const; + // If the parameter is not part of the user configuration, it it retrieved from the default configuration bool GetIntegerParameter(int& target, const std::string& parameter) const; bool LookupUnsignedIntegerParameter(unsigned int& target, const std::string& parameter) const; + // If the parameter is not part of the user configuration, it it retrieved from the default configuration unsigned int GetUnsignedIntegerParameter(const std::string& parameter) const; bool LookupBooleanParameter(bool& target, const std::string& parameter) const; + // If the parameter is not part of the user configuration, it it retrieved from the default configuration bool GetBooleanParameter(const std::string& parameter) const; void GetDicomModalityUsingSymbolicName(RemoteModalityParameters& modality,
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Wed Aug 12 10:07:40 2026 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Wed Aug 12 11:38:36 2026 +0200 @@ -183,22 +183,22 @@ } { - uint64_t storageMemoryCapacityMb, transcoderMemoryCapacityMb, dicomParserMemoryCapacityMb; - size_t storageMemoryCacheMb, transcoderMemoryCacheMb, dicomParserMemoryCacheMb; + uint64_t storageMemoryCapacity, transcoderMemoryCapacity, dicomParserMemoryCapacity; + size_t storageMemoryCache, transcoderMemoryCache, dicomParserMemoryCache; unsigned int storageReaderThreadsCount, transcoderReaderThreadsCount, dicomParserThreadsCount; - context.GetDataSourcesConfigurations(storageMemoryCapacityMb, storageMemoryCacheMb, storageReaderThreadsCount, - transcoderMemoryCapacityMb, transcoderMemoryCacheMb, transcoderReaderThreadsCount, - dicomParserMemoryCapacityMb, dicomParserMemoryCacheMb, dicomParserThreadsCount); + context.GetDataSourcesConfigurations(storageMemoryCapacity, storageMemoryCache, storageReaderThreadsCount, + transcoderMemoryCapacity, transcoderMemoryCache, transcoderReaderThreadsCount, + dicomParserMemoryCapacity, dicomParserMemoryCache, dicomParserThreadsCount); - result[ORTHANC_CONFIG_STORAGE_MEMORY_CAPACITY] = BytesToMegabytes(storageMemoryCapacityMb); - result[ORTHANC_CONFIG_MAXIMUM_STORAGE_CACHE_SIZE] = BytesToMegabytes(storageMemoryCacheMb); + result[ORTHANC_CONFIG_STORAGE_MEMORY_CAPACITY] = BytesToMegabytes(storageMemoryCapacity); + result[ORTHANC_CONFIG_MAXIMUM_STORAGE_CACHE_SIZE] = BytesToMegabytes(storageMemoryCache); result[ORTHANC_CONFIG_STORAGE_LOADER_THREADS] = storageReaderThreadsCount; - result[ORTHANC_CONFIG_TRANSCODER_MEMORY_CAPACITY] = BytesToMegabytes(transcoderMemoryCapacityMb); - result[ORTHANC_CONFIG_TRANSCODER_CACHE_SIZE] = BytesToMegabytes(transcoderMemoryCacheMb); + result[ORTHANC_CONFIG_TRANSCODER_MEMORY_CAPACITY] = BytesToMegabytes(transcoderMemoryCapacity); + result[ORTHANC_CONFIG_TRANSCODER_CACHE_SIZE] = BytesToMegabytes(transcoderMemoryCache); result[ORTHANC_CONFIG_TRANSCODER_THREADS] = transcoderReaderThreadsCount; - result[ORTHANC_CONFIG_DICOM_PARSER_MEMORY_CAPACITY] = BytesToMegabytes(dicomParserMemoryCapacityMb); - result[ORTHANC_CONFIG_DICOM_PARSER_CACHE_SIZE] = BytesToMegabytes(dicomParserMemoryCacheMb); + result[ORTHANC_CONFIG_DICOM_PARSER_MEMORY_CAPACITY] = BytesToMegabytes(dicomParserMemoryCapacity); + result[ORTHANC_CONFIG_DICOM_PARSER_CACHE_SIZE] = BytesToMegabytes(dicomParserMemoryCache); result[ORTHANC_CONFIG_DICOM_PARSER_SOURCE_THREADS] = dicomParserThreadsCount; }
--- a/OrthancServer/Sources/ServerContext.cpp Wed Aug 12 10:07:40 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Wed Aug 12 11:38:36 2026 +0200 @@ -505,7 +505,8 @@ if (!lock.GetConfiguration().LookupUnsignedIntegerParameter(resultMb, configurationName)) { resultMb = lock.GetConfiguration().GetUnsignedIntegerParameter(configurationName); - LOG(WARNING) << "====> '" << configurationName << "' is not defined in your configuration, setting it to " << resultMb << ". Depending on the available memory on the system, you might want to adapt this value."; + LOG(WARNING) << "====> '" << configurationName << "' is not defined in your configuration, setting it to " + << resultMb << "MB. Depending on the available memory on the system, you may want to adapt this value."; } else { @@ -2440,22 +2441,22 @@ return *dicomSequentialReaderFactory_; } - void ServerContext::GetDataSourcesConfigurations(uint64_t& storageMemoryCapacityMb, - size_t& storageMemoryCacheMb, + void ServerContext::GetDataSourcesConfigurations(uint64_t& storageMemoryCapacity, + size_t& storageMemoryCache, unsigned int& storageReaderThreadsCount, - uint64_t& transcoderMemoryCapacityMb, - size_t& transcoderMemoryCacheMb, + uint64_t& transcoderMemoryCapacity, + size_t& transcoderMemoryCache, unsigned int& transcoderReaderThreadsCount, - uint64_t& dicomParserMemoryCapacityMb, - size_t& dicomParserMemoryCacheMb, + uint64_t& dicomParserMemoryCapacity, + size_t& dicomParserMemoryCache, unsigned int& dicomParserThreadsCount) { - storageMemoryCapacityMb = storageAreaReader_->GetCapacity(); - storageMemoryCacheMb = storageAreaReader_->GetCacheCapacity(); - transcoderMemoryCapacityMb = transcoderReader_->GetCapacity(); - transcoderMemoryCacheMb = transcoderReader_->GetCacheCapacity(); - dicomParserMemoryCapacityMb = dicomReader_->GetCapacity(); - dicomParserMemoryCacheMb = dicomReader_->GetCacheCapacity(); + storageMemoryCapacity = storageAreaReader_->GetCapacity(); + storageMemoryCache = storageAreaReader_->GetCacheCapacity(); + transcoderMemoryCapacity = transcoderReader_->GetCapacity(); + transcoderMemoryCache = transcoderReader_->GetCacheCapacity(); + dicomParserMemoryCapacity = dicomReader_->GetCapacity(); + dicomParserMemoryCache = dicomReader_->GetCacheCapacity(); { boost::shared_ptr<IExecutorService> service = storageAreaReader_->GetExecutorService();
--- a/OrthancServer/Sources/ServerContext.h Wed Aug 12 10:07:40 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.h Wed Aug 12 11:38:36 2026 +0200 @@ -609,14 +609,14 @@ DicomSequentialReader::Factory& GetDicomSequentialReaderFactory(); - void GetDataSourcesConfigurations(uint64_t& storageMemoryCapacityMb, - size_t& storageMemoryCacheMb, + void GetDataSourcesConfigurations(uint64_t& storageMemoryCapacity, + size_t& storageMemoryCache, unsigned int& storageReaderThreadsCount, - uint64_t& transcoderMemoryCapacityMb, - size_t& transcoderMemoryCacheMb, + uint64_t& transcoderMemoryCapacity, + size_t& transcoderMemoryCache, unsigned int& transcoderReaderThreadsCount, - uint64_t& dicomParserMemoryCapacityMb, - size_t& dicomParserMemoryCacheMb, + uint64_t& dicomParserMemoryCapacity, + size_t& dicomParserMemoryCache, unsigned int& dicomParserThreadsCount); }; }
