Aaron Brown | 16 Feb 2010 14:55

Re: Iperf UDP Packet Loss


On Feb 14, 2010, at 8:51 PM, Wichai Komentrakarn wrote:

I am trying to use the Iperf to analyze UDP packet loss on a network. I saw Iperf reported several % packet loss but when I used Wireshark to capture the sent and received packets and compared them. I couldn't see any packets loss on the received side. Can you explain how Iperf reported percentage of packet loss or what is the condision that Iperf decided it didn't recieve a UDP packet.

Since UDP is a lossy protocol, the kernel does not guarantee that it will send data its been handed, and will sometimes drop the packets if, for example, the send or receive buffer are filled. It could also be that the packets got corrupted on the wire, didn't checksum properly and were tossed out.

Cheers,
Aaron

Internet2 Spring Member Meeting
April 26-28, 2010 - Arlington, Virginia
http://events.internet2.edu/2010/spring-mm/

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Iperf-users mailing list
Iperf-users@...
https://lists.sourceforge.net/lists/listinfo/iperf-users
Feghali, Jose | 16 Feb 2010 18:18
Favicon

Re: Iperf UDP Packet Loss

Aaron,

 

That may well be the case – but FWIW, when I was testing DVTS with the University of São Paulo last year, we consistently got huge packet loss reported by iperf depending on the settings and which Iperf version we used. Linux iperf versions did not give the same results. I compiled a newer version of Iperf for use with Windows which “behaved” better, but only after adjusting the –w settings. It consistently reported out-of-order packets which Wireshark and other sniffers didn’t “see” – and no artifact was seen on DVTS. I believe we communicated about this then, but no clear explanation could be found for that behavior – at least not that I recollect. There are, of course, a number of parameters that could affect iperf but we did try to have both computers network details matched – and tried several network cards.

 

All best,

 

José

 

 

From: Aaron Brown [mailto:aaron-H4aWS73dXup+qImEYqgU8Q@public.gmane.org]
Sent: Tuesday, February 16, 2010 7:56 AM
To: Wichai Komentrakarn
Cc: iperf-users-IlAC/IgH3vHkIehEPBwdNw@public.gmane.org
Subject: Re: [Iperf-users] Iperf UDP Packet Loss

 

 

On Feb 14, 2010, at 8:51 PM, Wichai Komentrakarn wrote:



I am trying to use the Iperf to analyze UDP packet loss on a network. I saw Iperf reported several % packet loss but when I used Wireshark to capture the sent and received packets and compared them. I couldn't see any packets loss on the received side. Can you explain how Iperf reported percentage of packet loss or what is the condision that Iperf decided it didn't recieve a UDP packet.

 

Since UDP is a lossy protocol, the kernel does not guarantee that it will send data its been handed, and will sometimes drop the packets if, for example, the send or receive buffer are filled. It could also be that the packets got corrupted on the wire, didn't checksum properly and were tossed out.

 

Cheers,

Aaron

 

Internet2 Spring Member Meeting
April 26-28, 2010 - Arlington, Virginia
http://events.internet2.edu/2010/spring-mm/

 

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Iperf-users mailing list
Iperf-users@...
https://lists.sourceforge.net/lists/listinfo/iperf-users
Marc Herbert | 16 Feb 2010 20:07
Picon
Favicon

Re: Iperf UDP Packet Loss

2010/2/16 Feghali, Jose <j.feghali@...>:

> That may well be the case – but FWIW, when I was testing DVTS with the
> University of São Paulo last year, we consistently got huge packet loss
> reported by iperf depending on the settings and which Iperf version we used.
> Linux iperf versions did not give the same results. I compiled a newer
> version of Iperf for use with Windows which “behaved” better, but only after
> adjusting the –w settings.

The socket buffer size has an impact on how some kernels drop UDP
packets. You will find more information about this in the archive of
this list.

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Iperf-users mailing list
Iperf-users@...
https://lists.sourceforge.net/lists/listinfo/iperf-users

Feghali, Jose | 17 Feb 2010 19:33
Favicon

Re: Iperf UDP Packet Loss

Marc,

Thanks for the note. 

For clarification - the main reason we decided to stop investigating this problem was that later on we had
the New World Symphony as a second testing site for comparison purposes. With the same version of iperf on
all computers, the results with the NWS were perfect, while the ones with USP were bad (although the
streams we sent and received perfectly). Obviously something about the link with Brazil was interfering
with the iperf results, but it worked just fine with Miami. Maybe iperf didn't like the router setup in
Brazil...   ;-)

-----Original Message-----
From: marc.herbert@...
[mailto:marc.herbert@...] On Behalf Of Marc Herbert
Sent: Tuesday, February 16, 2010 1:07 PM
To: Feghali, Jose
Cc: iperf-users@...
Subject: Re: [Iperf-users] Iperf UDP Packet Loss

2010/2/16 Feghali, Jose <j.feghali@...>:

> That may well be the case - but FWIW, when I was testing DVTS with the
> University of São Paulo last year, we consistently got huge packet loss
> reported by iperf depending on the settings and which Iperf version we used.
> Linux iperf versions did not give the same results. I compiled a newer
> version of Iperf for use with Windows which "behaved" better, but only after
> adjusting the -w settings.

The socket buffer size has an impact on how some kernels drop UDP
packets. You will find more information about this in the archive of
this list.

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Iperf-users mailing list
Iperf-users@...
https://lists.sourceforge.net/lists/listinfo/iperf-users

Yousuf Ahmad | 22 Feb 2010 22:24
Picon
Favicon

Iperf UDP parameters

 

Hello,

I am running a test on two windows machines that are connected to each other through a local Gigabit 8-port switch.  One is a Dell power edge Windows 2003 server and one is an XP laptop. Ports on both machines are running at 1Gbps and they have no other apps running on them besides iperf.  Windows 2003 server is acting as an iperf server and the laptop is acting as client

When I run udp test using ‘-b100m’ on the client with server running in default, I get about 95Mbps throughput but with lots of dropped packets.  I then start to increase the buffer size on both ends and find that at buffer size of ‘-w32MB’ dropped packets get down to zero.  To find max.udp  throughput on the 1Gbps link, I increased the bandwidth gradually to ‘the max. of –b2147m’ and found that the client would not even send anything faster than 115Mbps  regardless of what I set the buffer size to be.  It was only when I decreased the datagram size to ‘-l900B’ on both ends that the client started sending data at about 700Mbps (even then it was inconsistent –kept varying from 500-800Mbps-). 

How does iperf use “b, w and l” parameters?  Is there a way I can calculate or estimate their value in order to achieve max. UDP throughput for a given link?

Below are some samples from my test (server reports for each are at the bottom):

Thank you,

Yousuf,

 

C:\Iperf>iperf -c10.10.10.80 -u -i1 -b100m -w16KB

------------------------------------------------------------

Client connecting to 10.10.10.80, UDP port 5001

Sending 1470 byte datagrams

UDP buffer size: 16.0 KByte

------------------------------------------------------------

[1912] local 10.10.10.81 port 1680 connected with 10.10.10.80 port 5001

[ ID] Interval       Transfer     Bandwidth

[1912]  0.0- 1.0 sec  10.9 MBytes  91.2 Mbits/sec

[1912]  1.0- 2.0 sec  11.8 MBytes  98.9 Mbits/sec

[1912]  2.0- 3.0 sec  11.8 MBytes  98.9 Mbits/sec

[1912]  3.0- 4.0 sec  11.8 MBytes  98.9 Mbits/sec

[1912]  4.0- 5.0 sec  11.6 MBytes  97.4 Mbits/sec

[1912]  5.0- 6.0 sec  11.4 MBytes  95.8 Mbits/sec

[1912]  6.0- 7.0 sec  11.1 MBytes  92.7 Mbits/sec

[1912]  7.0- 8.0 sec  11.2 MBytes  94.3 Mbits/sec

[1912]  8.0- 9.0 sec  11.4 MBytes  95.8 Mbits/sec

[1912]  9.0-10.0 sec  11.2 MBytes  94.3 Mbits/sec

[1912]  0.0-10.0 sec   114 MBytes  95.7 Mbits/sec

[1912] Server Report:

[1912]  0.0-10.0 sec   112 MBytes  93.8 Mbits/sec  0.000 ms 1882/81491 (2.3%)

[1912] Sent 81491 datagrams

 

 

C:\Iperf>iperf -c10.10.10.80 -u -i1 -b100m -w1024KB

------------------------------------------------------------

Client connecting to 10.10.10.80, UDP port 5001

Sending 1470 byte datagrams

UDP buffer size: 1.00 MByte

------------------------------------------------------------

[1912] local 10.10.10.81 port 1737 connected with 10.10.10.80 port 5001

[ ID] Interval       Transfer     Bandwidth

[1912]  0.0- 1.0 sec  11.2 MBytes  94.3 Mbits/sec

[1912]  1.0- 2.0 sec  11.4 MBytes  95.8 Mbits/sec

[1912]  2.0- 3.0 sec  11.5 MBytes  96.9 Mbits/sec

[1912]  3.0- 4.0 sec  11.7 MBytes  97.9 Mbits/sec

[1912]  4.0- 5.0 sec  12.0 MBytes   100 Mbits/sec

[1912]  5.0- 6.0 sec  11.8 MBytes  98.9 Mbits/sec

[1912]  6.0- 7.0 sec  11.8 MBytes  98.9 Mbits/sec

[1912]  7.0- 8.0 sec  11.4 MBytes  95.8 Mbits/sec

[1912]  8.0- 9.0 sec  11.2 MBytes  94.3 Mbits/sec

[1912]  9.0-10.0 sec  11.2 MBytes  94.3 Mbits/sec

[1912]  0.0-10.0 sec   115 MBytes  96.6 Mbits/sec

[1912] Server Report:

[1912]  0.0-10.0 sec   115 MBytes  96.8 Mbits/sec  0.000 ms    0/82287 (0%)

[1912] Sent 82287 datagrams

 

C:\Iperf>iperf -c10.10.10.80 -u -i1 -b2147m -w32MB

------------------------------------------------------------

Client connecting to 10.10.10.80, UDP port 5001

Sending 1470 byte datagrams

UDP buffer size: 32.0 MByte

------------------------------------------------------------

[1912] local 10.10.10.70 port 2323 connected with 10.10.10.80 port 5001

[ ID] Interval       Transfer     Bandwidth

[1912]  0.0- 1.0 sec  13.8 MBytes   116 Mbits/sec

[1912]  1.0- 2.0 sec  14.0 MBytes   117 Mbits/sec

[1912]  2.0- 3.0 sec  14.2 MBytes   119 Mbits/sec

[1912]  3.0- 4.0 sec  14.3 MBytes   120 Mbits/sec

[1912]  4.0- 5.0 sec  14.0 MBytes   118 Mbits/sec

[1912]  5.0- 6.0 sec  14.2 MBytes   119 Mbits/sec

[1912]  6.0- 7.0 sec  13.6 MBytes   114 Mbits/sec

[1912]  7.0- 8.0 sec  13.6 MBytes   114 Mbits/sec

[1912]  8.0- 9.0 sec  13.8 MBytes   115 Mbits/sec

[1912]  9.0-10.0 sec  13.8 MBytes   116 Mbits/sec

[1912]  0.0-10.0 sec   139 MBytes   117 Mbits/sec

[1912] Server Report:

[1912]  0.0-10.0 sec   139 MBytes   117 Mbits/sec  1.201 ms    0/99331 (0%)

[1912] Sent 99331 datagrams

 

C:\Iperf>iperf -c10.10.10.80 -u -i1 -b2147m -w32MB -l900B

------------------------------------------------------------

Client connecting to 10.10.10.80, UDP port 5001

Sending 900 byte datagrams

UDP buffer size: 32.0 MByte

------------------------------------------------------------

[1912] local 10.10.10.70 port 2325 connected with 10.10.10.80 port 5001

[ ID] Interval       Transfer     Bandwidth

[1912]  0.0- 1.0 sec  80.5 MBytes   675 Mbits/sec

[1912]  1.0- 2.0 sec   101 MBytes   844 Mbits/sec

[1912]  2.0- 3.0 sec  99.6 MBytes   836 Mbits/sec

[1912]  3.0- 4.0 sec   104 MBytes   869 Mbits/sec

[1912]  4.0- 5.0 sec   102 MBytes   854 Mbits/sec

[1912]  5.0- 6.0 sec   104 MBytes   873 Mbits/sec

[1912]  6.0- 7.0 sec  93.1 MBytes   781 Mbits/sec

[1912]  7.0- 8.0 sec   102 MBytes   852 Mbits/sec

[1912]  8.0- 9.0 sec  93.6 MBytes   785 Mbits/sec

[1912]  9.0-10.0 sec  77.9 MBytes   653 Mbits/sec

[1912]  0.0-10.2 sec   956 MBytes   785 Mbits/sec

[1912] Server Report:

[1912]  0.0-10.2 sec   956 MBytes   787 Mbits/sec  19.225 ms    0/1114043 (0%)

[1912] Sent 1114043 datagrams

 

 

Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Iperf-users mailing list
Iperf-users@...
https://lists.sourceforge.net/lists/listinfo/iperf-users
Marc Herbert | 23 Feb 2010 14:00
Picon
Favicon

Re: Iperf UDP parameters

2010/2/22 Yousuf Ahmad <yousufa@...>:
> How does iperf use “b, w and l” parameters?

AFAIK Iperf does nothing with the socket buffer size argument ('-w')
but pass it to your operating system.

> Is there a way I can calculate or estimate their value in order to achieve max. UDP throughput for a given link?

Not without understanding the TCP/IP stack of your operating system
(this is of course much easier with an open-source system).

Regards,

Marc

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Iperf-users mailing list
Iperf-users@...
https://lists.sourceforge.net/lists/listinfo/iperf-users

Yousuf Ahmad | 23 Feb 2010 16:28
Picon
Favicon

Re: Iperf UDP parameters

 
Thank you very much Marc,
 
Is there a reason why the client would not send udp data higher than ~115Mbps till I lower the datagram size to about 900 bytes?  (when I do this it goes to about 700Mbps on a 1Gbps link).  This is regardless of my buffer size on both the client and sever machine.
 
On a seperate test, I also noticed that if I have the exact same setup with identical Windows PC's connected locally to a 100Mbps switch and all my ports were running at 100Mbps, the bandwidth the client sends does not seem to follow any specific trend.  For example,  if I set the client to send in 1,25, or 50Mbps, the client does seem to send packets at that rate. However, when I increase it to 100Mbps, it no longer scales and continues to send data at ~50Mbps.  The rate it sends the data starts to increase at about '-b150m'.  It peaks at about -b185m where it sends data at about ~94Mbps. If I increase the value of '-b' a little further, the client sharply drops its sending rate to about ~63-64Mbps (again this is regardless of the buffer size I have on the client and server). 
 
Any input you can provide on the machanics of this is greatly appreciated,
 
Best Regards,
Yousuf,
 
 
> Date: Tue, 23 Feb 2010 13:00:53 +0000
> Subject: Re: [Iperf-users] Iperf UDP parameters
> From: Marc.Herbert-GANU6spQydw@public.gmane.org
> To: yousufa-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org
> CC: iperf-users <at> dast.nlanr.net
>
> 2010/2/22 Yousuf Ahmad <yousufa <at> hotmail.com>:
> > How does iperf use “b, w and l” parameters?
>
> AFAIK Iperf does nothing with the socket buffer size argument ('-w')
> but pass it to your operating system.
>
>
> > Is there a way I can calculate or estimate their value in order to achieve max. UDP throughput for a given link?
>
> Not without understanding the TCP/IP stack of your operating system
> (this is of course much easier with an open-source system).
>
> Regards,
>
> Marc

Hotmail: Free, trusted and rich email service. Get it now.
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Iperf-users mailing list
Iperf-users@...
https://lists.sourceforge.net/lists/listinfo/iperf-users

Gmane