Slow Virtualization Networking

Posted on Posted in error, ip, ipv4, networking, virtualisation

I had a complaint from a customer today that there new virtual server with lots of resources was too slow on copying files and could I take a look.

So I did! The virtual server was connected to a 1GB switch via two different network cables. One was configured in the Hyper-V virtualization software as available for the guest and one for the host. In the host I could copy a test file across the network from a file server at close to the expected speed for the network:

image

Copying the same file from inside a virtual machine on that same host was considerably slower:

image

Notice the speeds. 85.3 MB/s compared to 355 KB/s!!!

I tried a tracert to the same file server. From the host I got  1    <1 ms    <1 ms    <1 ms  fileserver.domain.local[192.168.1.2] but from the guest I got   1    <200 ms    <201 ms    <38 ms  fileserver.domain.local[192.168.1.2]. Every host to file server tracert had a latency in excess of what I expect of some of the internet!

So how to fix…

On the host I checked which physical network card was being used by the Hyper-V guest (Virtual Switch Manager in the Hyper-V tools) and found it was Broadcom NetXtreme Gigabit Network #4 in this case. So in the host I brought up the properties of that same network card (Network and Sharing Center > Change adapter settings > and hover over each NIC to see the hardware description).

image

Bring up the properties of this network card and click Configure to bring up the configuration of the network card hardware for this specific NIC.

Change to the Advanced tab and select Virtual Machine Queues. Change this to Disabled.

image

Click OK. The network card will reset and come back online in about 3 to 5 seconds. The guest machine will be offline for this time as well. If you are changing the network card that the host uses as well, you will be disconnected from the host for this time as well (though you will be warned about this in the Hyper-V management tools).

Results when I connected to the guest again:

image

Now this is half the speed of the host – and I did not find on this machine other network settings to improve this, so I guess this is the impact of using virtualization over physical machines.

One thought on “Slow Virtualization Networking

  1. I had the inverse problem – copying a file from the VM host was happening at 355 KB/s; copying the same from a VM running on that host ran at 95+% of physical media speed (100Mb/s). Yes, I double-checked that it was not the opposite. A little surfing indicates that the specific number 355KB/s occurs with some frequency. Everybody who encounters it seems to encounter it in a different context. Everybody who fixes it seems to have a different incantation. Quite fascinating.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.