tcp time measure
From: Stephan Absmeier (me_at_privacy.net)
Date: 09/29/03
- Next message: Vijay Kumar R Zanvar: "Re: Bus Error?"
- Previous message: Jens.Toerring_at_physik.fu-berlin.de: "Re: Bus Error?"
- Next in thread: Arkady Frenkel: "Re: tcp time measure"
- Reply: Arkady Frenkel: "Re: tcp time measure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Sep 2003 12:51:49 +0200
Hi,
I did some time measure on tcp. I used SO_LINGER.
linger lingervalue;
lingervalue.l_onoff=1;
lingervalue.l_linger=32767;
setsockopt(mySocket,SOL_SOCKET,SO_LINGER,(char*)&lingerwert,sizeof(lingerwert));
then 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); //socket,SO_LINGER, bind and connect
start64=getRealTime();
testSender2.work(); //send data
do
closeid=testSender2.end();//close socket
while(closeid<0);
end64 = getRealTime();
I used a 100MBit Ethernet, sitched and Red Hat Linux 9. I did this 10
times and used the middle of the values
I have these problems:
* sending 80000 bytes (17ms) is faster than sending 10240 bytes (40ms)
* sending 800000 bytes is faster then the network (fastest value:2 ms
but it can't be faster then 64 ms)
What did I wrong? SO_LINGER wait til the queue has been send sucessfully.
Any idea is good. I go nuts over this.
Thanks
Stephan
- Next message: Vijay Kumar R Zanvar: "Re: Bus Error?"
- Previous message: Jens.Toerring_at_physik.fu-berlin.de: "Re: Bus Error?"
- Next in thread: Arkady Frenkel: "Re: tcp time measure"
- Reply: Arkady Frenkel: "Re: tcp time measure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|