tcp send bigger data faster then small data
From: Stephan Absmeier (me_at_privacy.net)
Date: 09/29/03
- Next message: Mike: "Piped Messages?"
- Previous message: Pete Zaitcev: "Re: SIGCHLD, SIG_IGN and zombie processes"
- Next in thread: Gisle Vanem: "Re: tcp send bigger data faster then small data"
- Reply: Gisle Vanem: "Re: tcp send bigger data faster then small data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Sep 2003 21:56:33 +0200
Hi,
I did:
typedef long long s64;
inline s64 getRealTime() {
s64 result;
__asm__ __volatile__ ("rdtsc" : "=A" (result));
return result;
}
s64 start64, end64;
tcpSender testSender2=tcpSender(argv[1],line,length);
testSender2.init(option); //SO_LINGER,bind,connect
start64=getRealTime();
testSender2.work();
closeid=testSender2.end(); //close(socket)
end64 = getRealTime();
I measured the time, I did 10 rounds to get the average value. I use Red
Hat 9.1, g++ 2.96, the data is produced by random, 100 MBit Ethernet,
switched. I used SO_LINGER to wait till the queue has been send correctly.
I send 8000, 10240 and 80000 bytes over the network.
I did this several times cause I couldn't believe it, but it was all
time the same
it send 8000 bytes in 32 ms, 10240 bytes in 40.8 ms and
80000 bytes in 10.5 ms.
why is it faster to send 80000 bytes then less bytes? who can explain? I
can use any idea.
Thanks
Stephan
- Next message: Mike: "Piped Messages?"
- Previous message: Pete Zaitcev: "Re: SIGCHLD, SIG_IGN and zombie processes"
- Next in thread: Gisle Vanem: "Re: tcp send bigger data faster then small data"
- Reply: Gisle Vanem: "Re: tcp send bigger data faster then small data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|