changeset 3316:4b1017928fc4

Fix performance issue in DICOM protocol by disabling Nagle's algorithm
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 28 Feb 2019 18:21:28 +0100
parents 8bf33fa68435
children 56d7f3d50c89 b770435a93d3
files NEWS Resources/CMake/DcmtkConfiguration.cmake Resources/CMake/DcmtkConfigurationStatic-3.6.2.cmake Resources/CMake/DcmtkConfigurationStatic-3.6.4.cmake
diffstat 4 files changed, 28 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Thu Feb 28 18:09:36 2019 +0100
+++ b/NEWS	Thu Feb 28 18:21:28 2019 +0100
@@ -14,6 +14,7 @@
 
 * Enlarge the support of JSON-to-XML conversion in the REST API
 * Fix missing DB transactions in some write operations
+* Fix performance issue in DICOM protocol by disabling Nagle's algorithm
 
 
 Version 1.5.5 (2019-02-25)
--- a/Resources/CMake/DcmtkConfiguration.cmake	Thu Feb 28 18:09:36 2019 +0100
+++ b/Resources/CMake/DcmtkConfiguration.cmake	Thu Feb 28 18:21:28 2019 +0100
@@ -88,6 +88,7 @@
     -DDCMTK_VERSION_NUMBER=${DCMTK_VERSION_NUMBER}
     )
 
+
   if (NOT ENABLE_DCMTK_LOG)
     # Disable logging internal to DCMTK
     # https://groups.google.com/d/msg/orthanc-users/v2SzzAmY948/VxT1QVGiBAAJ
--- a/Resources/CMake/DcmtkConfigurationStatic-3.6.2.cmake	Thu Feb 28 18:09:36 2019 +0100
+++ b/Resources/CMake/DcmtkConfigurationStatic-3.6.2.cmake	Thu Feb 28 18:21:28 2019 +0100
@@ -179,3 +179,16 @@
 #set_source_files_properties(${DCMTK_SOURCES}
 #  PROPERTIES COMPILE_DEFINITIONS
 #  "PACKAGE_VERSION=\"${DCMTK_PACKAGE_VERSION}\";PACKAGE_VERSION_NUMBER=\"${DCMTK_VERSION_NUMBER}\"")
+
+
+# Starting with DCMTK 3.6.2, the Nagle algorithm is not disabled by
+# default since this does not seem to be appropriate (anymore) for
+# most modern operating systems. In order to change this default, the
+# environment variable NO_TCPDELAY can be set to "1" (see envvars.txt
+# for details). Alternatively, the macro DISABLE_NAGLE_ALGORITHM can
+# be defined to change this setting at compilation time (see
+# macros.txt for details).
+# https://forum.dcmtk.org/viewtopic.php?t=4632
+add_definitions(
+  -DDISABLE_NAGLE_ALGORITHM=1
+  )
--- a/Resources/CMake/DcmtkConfigurationStatic-3.6.4.cmake	Thu Feb 28 18:09:36 2019 +0100
+++ b/Resources/CMake/DcmtkConfigurationStatic-3.6.4.cmake	Thu Feb 28 18:21:28 2019 +0100
@@ -169,3 +169,16 @@
   ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdictbi.cc
   ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/mkdeftag.cc
   )
+
+
+# Starting with DCMTK 3.6.2, the Nagle algorithm is not disabled by
+# default since this does not seem to be appropriate (anymore) for
+# most modern operating systems. In order to change this default, the
+# environment variable NO_TCPDELAY can be set to "1" (see envvars.txt
+# for details). Alternatively, the macro DISABLE_NAGLE_ALGORITHM can
+# be defined to change this setting at compilation time (see
+# macros.txt for details).
+# https://forum.dcmtk.org/viewtopic.php?t=4632
+add_definitions(
+  -DDISABLE_NAGLE_ALGORITHM=1
+  )