Home | Contact | Sign in

Windows Infrastructure

Real life Active Directory, Hyper-V, Forefront , Performance and Security experiences By Erik den Burger

Increase network throughput under load in Hyper-V

Tags:  Hyper-V · Performance

The default buffer size used by a virtual switch used by Hyper-V may provide not enough space to buffer all the network traffic, therefore resulting in packet loss. This may happen when hyper-V is put under a significant load. Default buffer size is 1 MB and may be increased to provide better performance.

Comparable to a normal traffic jam, where there are too many cars trying to drive the same piece of road, the same can happen to network traffic. This can result in poor network performance. Especially in virtual environments these problems can be complex with several child partitions fighting for the same physical NIC. Hyper-V or better the VMBus of the Hyper-V supervisor is regulating the access to the physical NIC by using buffers and queues to keep all data flowing. However when these buffers run out of space some data packets will be dropped. In Windows Server 2008R2 the default size for this buffer is 1 MB, giving room for 655 packet buffers of 1600 bytes each. Although in most situations this value will give you more than enough room to play it may be advisable in some larger and busier Hyper-V environments to increase this value to 2 MB or even 4 MB. Anything more is not useful.

The process of increasing this buffer size isn't done with a fancy setting hidden in the GUI but should be done in the registry of the guest partition. We need to have a GUID and index of the network adapter which we can find by opening the Device manager, expand network adapters, right click the MS Virtual Machine Bus driver and choose properties. In the details tab we select the driver key. We no get the GUID/Index we need. We can now go to the registry editor and go to HKLM\SYSTEM\CurrentControlSet\Control\Class\<GUID>\<Index> where we can create to new DWORD values: ReceiveBufferSize and SendBufferSize. These values are representing the amount of memory that will be used as a buffer in 1 Kb units. 0x400, the default value, will result in a cache of 1 MB. Now I almost forget to mention that changing the registry is dangerous and you should have made a backup before you were changing any settings.

With most Hyper-V servers having plenty of memory nowadays, it is a good idea to increase the buffer size to give you a better network performance and protect you from packet-loss.

February 6, 2010 · Posted by Erik den Burger

Links to this post

Comments

Leave a comment

Your name:

Your website/blog:

Your email address:

Your comments:

CAPTCHA Image Validation: