Bugzilla – Bug 2074
DCE Linux memory defaults too low to allow Linux TCP to have >32767 byte window
Last modified: 2015-05-31 09:00:19 EDT
The default behavior of TCP in DCE Linux is to allow a maximum window size of around 32kB.
This is because requests by the Linux sockets/TCP code to allocate additional buffer memory fail.
In kernel code file ./net/core/sock.c (sk_init), the value of totalram_pages is zero, so the sysctl wmem and rmem values (default & max) are set to 32767. totalram_pages is set to zero in kernel code file ./arch/sim/glue.c.
Since one of the main reasons for using DCE Linux is to have realistic network code behavior, it is disappointing for the default behavior to be crippled in this way.
I would recommend changing it so that the default behavior is more realistic. This can be achieved in many ways, but I would request that it not require extra code on the part of the NS3 user (e.g. running sysctl commands or calling other functions to set the memory available). My reason for this request is that this would be an extra step that a user should not have to take.
Thanks Chip for the report, and I fully agree with the proposed change.
do you mind to provide a simulation script (minimum reproducible one is the best) so that I can confirm the issue ? the script will be also useful to avoid a future regression during nightly tests.
I tentatively fixed an issue.
Since I don't have reproduced this issue yet in my local environment, I kept this issue opened until we come up with a test program.
Thank you very much for proposing a fix. I confirm that the proposed patch works for me.
Sorry it took so long to make a test case. I am attaching one in a minute, but using it requires fixing another bug that I will report in another minute.
Created attachment 2050 [details]
test case for checking DCE-Linux TCP memory and perf TCP window size and simulations with different node types
I added a couple of commits to the net-next-sim.
with this version, the example 'dce-iperf-heterogeneous-multihop.cc' gives the following goodput with the default sysctl values (rmem/wmem).
[ 3] 117.0-118.0 sec 2.00 MBytes 16.8 Mbits/sec
[ 3] 118.0-119.0 sec 2.00 MBytes 16.8 Mbits/sec
[ 3] 119.0-120.0 sec 1.88 MBytes 15.7 Mbits/sec
[ 3] 0.0-120.0 sec 236 MBytes 16.5 Mbits/sec
before the fix, it was like below.
[ 3] 115.0-116.0 sec 640 KBytes 5.24 Mbits/sec
[ 3] 116.0-117.0 sec 640 KBytes 5.24 Mbits/sec
[ 3] 117.0-118.0 sec 640 KBytes 5.24 Mbits/sec
[ 3] 118.0-119.0 sec 640 KBytes 5.24 Mbits/sec
[ 3] 119.0-120.0 sec 640 KBytes 5.24 Mbits/sec
[ 3] 0.0-120.2 sec 75.0 MBytes 5.24 Mbits/sec
let me know if you still see any issue.