[Iccrg] improvement of tcp slow start
Stefan Hirschmann
krasnoj at gmx.at
Thu Mar 15 14:34:40 GMT 2007
Hi!
I made a few thoughts about the tcp slow start behavior (each paket
increases the window by 1, so that the value is doubled each RTT). But I
think this behaviour is to slow, so that most of the connection can not
use the maximum speed.
I wrote a TCP slow start simulator <http://nopaste.debianforum.de/5415>
. The output is:
time[ms] currend send window[1] current used bandwith[KB/s]
already sended data[KByte]
If you look at the output:
=============================================================
$: ./slowStartSimulator 102400 1.5 500 1 1
bandWith = 102400
time snd_cwnd used_bandWith alreadySended
0 1 3.0 0.0
500 2 6.0 1.5
1000 4 12.0 4.5
1500 8 24.0 10.5
2000 16 48.0 22.5
2500 32 96.0 46.5
3000 64 192.0 94.5
3500 128 384.0 190.5
4000 256 768.0 382.5
4500 512 1536.0 766.5
5000 1024 3072.0 1534.5
5500 2048 6144.0 3070.5
6000 4096 12288.0 6142.5
6500 8192 24576.0 12286.5
7000 16384 49152.0 24574.5
7500 32768 98304.0 49150.5
8000 65536 196608.0 98302.5
USAGE: ./slowStartSimulator bandwith packetSize pingTime [adder multiplier]
everything in KB and ms
=============================================================
You see that it takes 8 seconds till the TCP flow reaches 100MB/s at a
pingTime from 500ms (realistic for satellite uplinks distance = 4 * 36000).
So I thought about improvements. If you change the std behaviour
(tp->snd_cwnd++;) with multiply by 3(tp->snd_cwnd+=2) you get this output:
=============================================================
$slowStartSimulator 102400 1.5 500 2 1
bandWith = 102400
time snd_cwnd used_bandWith alreadySended
0 1 3.0 0.0
500 3 9.0 1.5
1000 9 27.0 6.0
1500 27 81.0 19.5
2000 81 243.0 60.0
2500 243 729.0 181.5
3000 729 2187.0 546.0
3500 2187 6561.0 1639.5
4000 6561 19683.0 4920.0
4500 19683 59049.0 14761.5
5000 59049 177147.0 44286.0
USAGE: ./slowStartSimulator bandwith packetSize pingTime [adder multiplier]
everything in KB and ms
=============================================================
Now it takes only 5 seconds till the 100 MB/s is reached.
If you use (tp->snd_cwnd+=3); you get this output:
=============================================================
slowStartSimulator 102400 1.5 500 3 1
bandWith = 102400
time snd_cwnd used_bandWith alreadySended
0 1 3.0 0.0
500 4 12.0 1.5
1000 16 48.0 7.5
1500 64 192.0 31.5
2000 256 768.0 127.5
2500 1024 3072.0 511.5
3000 4096 12288.0 2047.5
3500 16384 49152.0 8191.5
4000 65536 196608.0 32767.5
USAGE: ./slowStartSimulator bandwith packetSize pingTime [adder multiplier]
everything in KB and ms
=============================================================
Now it takes only 4 seconds, till the 100MB/s is reached.
I also tried to replace (tp->snd_cwnd++;) with something like
(tp->snd_cwnd *= 2) but I think this is to aggressive and should not be
used:
=============================================================
$slowStartSimulator 1024 1.5 500 0 2
bandWith = 1024
time snd_cwnd used_bandWith alreadySended
0 1 3.0 0.0
500 2 6.0 1.5
1000 8 24.0 4.5
1500 2048 6144.0 16.5
=============================================================
Summary:
The slowstart algorithm is from a time, where 56k modems where state of
the art, but it is too less aggressive for todays networks. So I suggest
to replace it with +=2 or +=3.
What do you think about this? I made the programm with much care, but
maybe I overlooked a bug, so if you want, check it too.
Stefan
More information about the Iccrg
mailing list