-1

I am testing the network performance of VMs in Xen and Hyper-V using Iperf and Netperf. In both hypervisors I found a Linux guest VM in different modes is having a relatively high performance than a Windows one. Even a fully virtualized Linux guest VM showed a better performance than a Windows guest VM with PV drivers.

So for each virtual machine I used the loopback address to create a client-server model on the same virtual machine. I established the same tests on all virtual machines and I didn't specify any buffer size or window size, and I left it for the tools to decide.

For instance, testing a TCP conncetion using the following commands:

iperf -c 127.0.0.1

or

netperf -H 127.0.0.1

and I have got the follwing results by Iperf on Hyper-V in 32-bit environments:

Linux (Enlightened): 18 Gbits/s Linux (Unenlightened): 10.5 Gbits/s Windows (Enlightened): 3 Gbits/s Windows (FV+IS): 0.5 Gbits/s Windows (Unenlightened): 0.4 Gbits/s

Both hypervisors and both tools showed the same performance, also in 64-bit environments.

So is there any explanation for this ?!

Note: FV+IS >> unenlightened guest VM with Integration Services installed.

Thanks in advance,

Mahmoud

Mabu
  • 11
  • 2

1 Answers1

3

Your benchmark is not testing the network performance of either operating system.

Linux implements the loopback device as a pure software layer, with no connection to actual networking devices. On Windows, there isn't even a loopback device linked to the 127.0.0.1 address.

All your tests could be measuring is the performance of CPU scheduling and memory bandwidth. Linux and Windows have very different network stacks and I'm not sure anyone paid attention to do any performance optimizations on the loopback device driver (or whatever is the equivalent in the Windows kernel).

Is there any particular application you use that is transferring large amounts of data through local TCP/IP connections? If so, that's one of the most inefficient methods of transferring data locally.

Regarding actual network performance, please beware that Windows and Linux have different network stack with different default settings. You should investigate what your application will be using in terms of buffers, TCP window, etc and adjust iperf/netperf accordingly to mimic that behavior. Then transfer data between different VMs on the same host, VMs on different hosts, VMs and physical servers, etc. Pay attention to network ports' settings, uplink saturation, etc.

Again, your tests are only benchmarking non-optimized algorithms and data structures running purely in software.

EDIT: You may want to read more about the improvements done in loopback network in Windows Server 2012 and Windows 8.

Giovanni Tirloni
  • 5,693
  • 3
  • 24
  • 49
  • What would be an efficient method for transferring data locally? – Jose Flores Aug 27 '14 at 20:41
  • Shared memory? Named pipes? Writing to a file? TCP/IP was designed to work over unreliable network connections and thus adds unnecessary complexity when data has to travel locally within a single computer. Note that the OP is talking about maxing out his local data transfer over TCP/IP, so I assume he wants to transfer a huge amount of data. If your application is not doing that, TCP/IP locally is more than adequate, even with the added complexity. – Giovanni Tirloni Aug 27 '14 at 20:50