Uncategorized

Turbo-charge View Video Performance

For desktop VMs using VMXnet3 NICs, you can significantly improve the peak video playback performance of your View desktop by simply setting the following registry setting to the value recommended by Microsoft:

HKLM\System\CurrentControlSet\Services\Afd\Parameters\FastSendDatagramThreshold to 1500

[As discussed in a Microsoft KB article here]

[N.B. A reboot of the desktop VM is required after changing this registry setting]

When running full-screen videos at 1080p resolution on a 2vCPU desktop, we see this deliver frame-rate improvements of up to 1.4X.

So, what does this do and why does it deliver these benefits?

The VMXNET3 adapter is a paravirtualized NIC designed for performance that, as of vSphere 5, supports interrupt coalescing. Virtual interrupt coalescing is similar to a physical NICs interrupt moderation and is useful in improving CPU efficiency for high throughput workloads. Unfortunately, out-of-the-box, Windows does not benefit from interrupt coalescing in many scenarios (those sending packets larger than 1024-bytes), because after sending a packet, Windows waits for a completion interrupt to be delivered before sending the next packet. By setting ParametersFastSendDatagramThreshold to the Microsoft recommended value of 1500 bytes you instruct Windows not to wait for the completion interrupt even when sending larger packets. Accordingly, you are allowing View and PCoIP (as well as other applications that send larger packets) to benefit from interrupt coalescing – reducing CPU load and improving network throughput for PCoIP  — which translates into significantly improved video playback performance.

Comments

15 comments have been added so far

  1. How do things work when using E1000 virtual adapters for example? Would adjusting this registry key help at all?

    As it is a change to the way Winsock handles UDP packets I would have thought so – but curious to know as the above mentions specifically with regard VMXNET3 adapters.

    1. for what its worth Having deployed a win7 vm from MDT using the TS.xml from the Win 7 optimisation guide as of Jan 2013 the necessary registry entry wasn’t included for this.

  2. Hey There. I found your blog the usage of msn. That is a really neatly written article. I will make sure to bookmark it and come back to learn more of your useful information. Thank you for the post. I will certainly return.

  3. I have found with WIndows7 its already set to 1500 maybe from the View Agent? In any case I use 2048 for local LAN for my Installs.

    Jeremy

  4. I’d like to point out that FastSendDatagramThreshold not only applies to VDI environments. FastSendDatagramThreshold has the potential to waste months and years of time of a developers life. This was actually one of carrier nightmares during analysis and windows embedded development.

    During analysis I once noticed our UDP video streaming appliance was magically limited in its bandwidth. With the Threshold default value, the UDP output was limited to 100Mbit/s to 300Mbit/s and 10k to 30k packets per second.

    It took me weeks of analysis to find this value and the KB mentioned above.
    I suppose this is an optimization leftover back from times of 10 and 100 network cards.

    If you cannot change the value to 1500, you need to make sure your UDP packets are properly sized, so they are NOT locked and buffered before sent as described on the MS KB!

    This value may or may not apply to Win8/2012. There are blogs around the internet about the new IO features. I remember a blog, stating UDP Performance was ten times and even higher compared to Win7!

  5. Thanks for the sensible critique. Me and my neighbor were just preparing to do some research on this. We got a grab a book from our local library but I think I learned more clear from this post. I am very glad to see such magnificent info being shared freely out there.

Leave a Reply

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