Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Iperf on two VMs and when using TCP I find the performance is as follows:

notroot@ubuntu:~$ iperf -s
Server listening on TCP port 5001 TCP window size: 85.3 KByte (default)
[ 4] local port 5001 connected with port 52478
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 2.22 GBytes 1.90 Gbits/sec

UDP on the other hand is awful:

notroot@ubuntu:~$ iperf -s -u
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size: 208 KByte (default)
[ 3] local port 5001 connected with port 33775
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0-10.0 sec 1.25 MBytes 1.05 Mbits/sec 0.284 ms 0/ 893 (0%)

I was reading this article


  1. What do you think of the results?
  2. How can I manipulate the datagram size in case it is a fragmentation issue? Though that said I can confirm that the Iperf client is sending 1470 byte datagrams.


share|improve this question

migrated from Apr 9 '13 at 11:47

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

Following a quote from an answer on

Each frame goes through several buffers as you send it: The application buffer, The Protocol Buffer, The Software interface buffer and the Hardware interface buffer. As you start stressing the stack by sending high speed data you will fill up these buffers and either block or lose data. You also have strategies for timeliness and polling that can impact your performance. For example, by using a larger buffer and poll less often you can get much better performance while sacrificing latency.

TCP is optimized for high speed bulk transfers while UDP is optimized for low latency in the Linux kernel. This has an impact on buffer sizes and how data is polled and handed over. In addition to this, you frequently have offloading to hardware for TCP. I would expect considerably better performance for TCP compared to UDP.

Note that sending high speed data over UDP is usually a bad idea, unless you implement your own congestion control. TCP protects your network from congestion collapses. Use UDP when you have small amounts of data or high timeliness requirements.

share|improve this answer

iPerf uses a default of 1Mb/sec for UDP tests. Use the -b flag on the iperf client to specify the UDP bandwidth you want to transmit at e.g.

iperf -c -u -f m -b 100M
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.