in dul.cc we can find DONT_DISABLE_NAGLE_ALGORITHM defined code block, this code by default disables NAGLE algorithm ( http://en.wikipedia.org/wiki/Nagle%27s_algorithm )
here is some facts why i suggest to add DONT_DISABLE_NAGLE_ALGORITHM to configs.
i used two DCMTK 3.6.0 powered dicom devices, one is sender and another is receiver (multithread server), linux, kernel 3.2.6
test file - 27265994 bytes MG modality from D.Clunie test repository.
the first stage: nagle is disabled
real 0m2.572s
user 0m0.191s
sys 0m0.331s
real 0m2.565s
user 0m0.173s
sys 0m0.314s
real 0m2.594s
user 0m0.193s
sys 0m0.307s
real 0m2.566s
user 0m0.198s
sys 0m0.365s
average is 2,57425s
tcpdump report (from receiving box, counts only incoming dicom packets)
19159 packets captured
19159 packets captured
19159 packets captured
19159 packets captured
the second stage: nagle is enabled
real 0m2.568s
user 0m0.192s
sys 0m0.361s
real 0m2.568s
user 0m0.197s
sys 0m0.352s
real 0m2.623s
user 0m0.195s
sys 0m0.343s
real 0m2.567s
user 0m0.191s
sys 0m0.384s
average is 2,5815s
18949 packets captured
18949 packets captured
18949 packets captured
18949 packets captured
so, we have network overweight if nagle is disabled (+210 packets) also i don't see serios reasons to "optimize" network speed in this manner.
NAGLE
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2501
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Thank you for the detailed report. Did you read the documentation of this macro in macros.txt:
Code: Select all
DONT_DISABLE_NAGLE_ALGORITHM
Affected: dcmnet
Type of modification: Disables feature
Explanation: By default, DCMTK disables the so-called Nagle algorithm
for each DICOM transport connection. This provides a 2-4 times
performance improvement (WinNT4/SP4, 100Mbit/s Ethernet). Effects on
other environments are unknown. When compiled with this macro, the
code affecting the Nagle algorithm is disabled. See documentation
for environment variable TCP_NODELAY in config/docs/envvars.txt.
-
- DCMTK Developer
- Posts: 2501
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
-
- DCMTK Developer
- Posts: 2501
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest