[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(usagi-users 02246) Re: Latency in IPv4 vs IPv6



I though we can spect routing  efficiency to improve?, since there is less processing done to managed an IPv6 header. I mean in IPV6, a Router is not allowed to fragment packets and the checksum no longer needs to be recalculated because it had been removed.

Valdis.Kletnieks@xxxxxx wrote:
On Tue, 25 Feb 2003 06:29:42 PST, Rashid Wasseem <wayne6600@xxxxxxxxx>  said:

  
I used netperf to measure round trip times for  TCPIPv4/IPv6 and UDP IPv4/
IPv6 and throughputs.  Now I am getting low latency in IPv6 as compared to IPv4
for both UDP and TCP. Can some body please explain me why it is  happening
like this. As we were expecting high latency in case of IPv6.
    

Why were you expecting high latency? Remember that all the basic algorithms
and all that stuff are basically the same, so you'd expect similar performance
characteristics.

  
I am pasting three values out of my results for packet size 64, 768, 1408

packet size=  64
RTT(microsecond)TCPIPv4 =154 ;
RTT TCPIPV6        = 129 ;

packet size=  768
RTT(microsecond)TCPIPv4 =302 ;
RTT TCPIPV6        = 278;

packet size=  1408
RTT(microsecond)TCPIPv4 = 439;
RTT TCPIPV6        = 409 ;
    

Hmm... in all 3 cases, the v6 version is about 25-30 microseconds faster.
This rules out the checksumming or similar issues, and points at some
difference in header processing.

I'm going to make a totally unsupported guess that the difference is in the
IPv4 'arp' code versus IPv6 neighbor discovery.

Have you checked your timer code to verify the *real* resolution of the
timer?  Remember that the 2.4 kernel uses HZ=100 by default, and the 2.5
kernel uses HZ=1000 - and that userspace access to intervals shorter than
this can be.... interesting... :)

It's also possible that your timer instrumentation isn't quite symmetric - so
you're not measuring the between the same points in the stack.  For instance,
looking at the difference of 439 usec for 1408 bytes versus 154 usec for 64
bytes shows that you're transmitting the other 1344 bytes in 285 usec RTT.
This works out to around 75 bits/usec, a bit short of the 100 you'd expect on a
100mbit link. (Don't sweat that too bad - the same calculation on my box using
'ping -s 64' and 'ping -s 1500' showed 87% bandwidth use).