How to improve VMware View video performance – Part 2

Fastandfurious6During a performance optimizing session this week, with a customer, we found some interesting things to boost specific parts of the environment. While playing a high resolution video with clipping where the whole screen turns black and shows a new screen a split second later.

When we started, we saw the video bump and freeze from time to time. Also we experienced ghost lines on the middle of the screen, where the upper part of the screen moved first while the bottom part tried to keep up. We used the Fast & Furious 6 Official Trailer in an 1080p format for testing. The the business news running in an embedded Windows media player on Internet Explorer 9 didn’t perform well either.

The vDesktop is a Windows 7 Enterprise desktop with 2GB memory and 2 vCPU so it can play native 720p videos when necessary as Erik mentioned in his post. We are running the VMware View environment on an Imtech built Flexpod with NetApp storage, Cisco UCS computing power and Cisco Nexus switching for VMware vSphere and VMware View 5.

(more…)

How to improve VMware View video performance

ImproveDuring the last weeks we’ve been busy implementing a large VMware View deployment for one customer and planning an even larger VMware View deployment for another customer. At the first site we ran into some video performance issues which we definitely want to avoid during the second project.

In our quest to solve and avoid the video performance issues we ran into a number of ways to improve the video performance in VMware View that I would like to share.

First of all, we used the information below from the VMware Architecture Planning Guide:

480p-formatted video You can play video at 480p or lower at native resolutions when the View desktop has a single virtual CPU. If the operating system is Windows 7 and you want to play the video in high-definition Flash or in full screen mode, the desktop requires a dual virtual CPU.

720p-formatted video You can play video at 720p at native resolutions if the View desktop has a dual virtual CPU. Performance might be affected if you play videos at 720p in high definition or in full screen mode.

1080p-formatted video If the View desktop has a dual virtual CPU, you can play 1080p formatted video, although the media player might need to be adjusted to a smaller window size.

3D If you plan to use 3D applications such as Windows Aero themes or Google Earth, the Windows 7 View desktop must have virtual hardware version 8 and turn on the pool setting called Windows 7 3D Rendering. Up to 2 monitors are supported, and the maximum screen resolution is 1920 x 1200. This non-hardware accelerated graphics feature enables you to run DirectX 9 and OpenGL 2.1 applications without requiring a physical graphics processing unit.

These are the settings we used to size the first solution, so we use a Windows 7 desktop image with dual vCPU, 2GB memory, a VMXNET3 adapter and hardware version 8.

Update 03-2014: We recently found out that with the recent improvements in vSphere 5.5 and Horizon View 5.3 we can now offer full screen 720p video with only 1 vCPU VDI virtual machines. VMware has not yet updated their documentation but a VMware employee confirmed that updates in eg. the code of the VMware SVGA graphics driver resulted in this improvement.

This is good for playing 720p in native video resolution but when scaling to full screen this setup does not run smoothly.

Note how it says “native resolutions“, plural. In this case, 720p only defines the aspect ration of 16:9 and 720 horizontal scan lines. In this case native resolution means, the resolution in which a video is presented to you by default, with no up- or down-scaling applied. So it does not define 1280 × 720 video resolution.

 

Modify Fast Send Datagram Threshold

For desktop VMs using VMXnet3 NICs, you can significantly improve the peak video playback performance of your View desktop. 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 FastSendDatagramThreshold to the Microsoft recommended value of 1500 bytes you instruct Windows not to wait for the completion interrupt even when sending larger packets. So modify the following registry setting to the value:

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

This allows VMware View and PCoIP to benefit from interrupt coalescing which reduces CPU load and improves network throughput for PCoIP. This translates into significantly improved video playback performance of up to 1.4 times when running full-screen videos at 1080p resolution on a 2vCPU desktop.

PCoIP

 

Configure PCoIP image quality levels

With View 5 VMware has released a few VMware View GPO’s that can be used to modify the default behaviour of the PCoIP protocol. Many View customers use this to turn down the bandwidth PCoIP uses in low bandwidth situations. This lowers the frame rate, limits the bandwidth and thereby it changes the image quality. But you can also use it the other way around and allow for better video performance.

PColPMaxLinkRate GPO
This GPO can be used to set the desired maximum PCoIP session bandwidth in kilobits per second.
(example: 1000 = 1000Kbps = 1Mbps). The default value is 1Gbps (1.000.000Kbps), 0 = no bandwidth constraints.

When you are in a LAN environment and bandwidth is not an issue, try setting the PColPMaxLinkRate to ’0′ to improve the video performance.

PColPlmagingMinimumlmageQuality GPO
This GPO can be used to adjust the minimum image quality. Range is a value between 30-100, the default value is 50. When  you set a lower image quality (lower value) the result is a higher frame rate for smooth motion but with lower image quality. When you set a higher image quality (higher value) the result is crisp imaging but with less smooth image motion.

To improve the video performance try lowering the PColPlmagingMinimumlmageQuality value.

PColPlmagingMaximumlnitiallmageQualitv GPO
This GPO can be used to adjust the maximum image quality. Range is a value between 30-100, the default value is 90. When  you set a higher value, the result is a higher initial image quality, with larger peaks in bandwidth during large screen changes. When you set a lower value, the result is a lower initial image quality, with smaller peaks in bandwidth during large screen changes.

When you suspect that bandwidth is an issue, for instance on WiFi connections, try lowering the PColPlmagingMaximumlnitiallmageQualitv value to improve the video performance.

 

These setting are the default VMware View GPO settings to adjust PCoIP behaviour but I also found a PCoIP setting hidden in the registry.

PCoIP.maximum_frame_rate
This setting can be used to set the maximum frame rate. The default value is 30 frames per second. When you set a higher value, the result is a higher frame rate and smooth display imaging motion but with possible increased average network bandwidth. When you set a lower value, the result is a lower frame rate with a lower average network bandwidth but with less smooth image motion.

To improve video performance, create the registry key below (REG_DWORD) and try some higher values. Setting in frames per second/Hz (example: 8, 12 or 15 fps).

HKEYLOCAL_MACHINE\SOFTWARE\Policies\Teradici\PC0IP\pcoip_admin\pcoip.maximum_frame_rate

 

Handle with care
All these settings above can improve the video performance dramatically but as a result it consumes more bandwidth. My advice would be to use Active Directory, logon scripts and/or workspace managers like RES to apply these settings to only the desktops that need better quality video performance and are on a LAN with the bandwidth needed. Don’t use it for all VDI desktops unless everyone needs better quality video performance.

 

PCoIP settings

 

 

Multi-Media Redirection

If all this fails you can always reside to old fashioned Multi-Media Redirection (MMR) and use the local processing power to render the video on the client side, but this has some caveats.

Multimedia redirection (MMR) delivers the multimedia stream directly to client computers by using a virtual channel. With MMR, the multimedia stream is processed, that is, encoded and decoded, on the client system. Local hardware formats and plays media content, thereby offloading the demand on the ESX/ESXi host.

The problem is that there is only limited support. The MMR feature supports the media file formats that the client system supports, because local decoders must exist on the client. File formats include MPEG2-1, MPEG-2, MPEG-4 Part 2; WMV 7, 8, and 9; WMA; AVI; ACE; MP3; and WAV, among others.

This feature has the following limitations:

  • For best quality, use Windows Media Player 10 or later, and install it on both the local computer, or client access device, and the View desktop.
  • The Wyse MMR port, which is 9427 by default, must be added as a firewall exception in the View desktop.
  • MMR is not supported with PCoIP on Windows 7 clients or virtual desktops.

Windows 7 clients and Windows 7 View desktops do not support MMR. For Windows 7 clients agents, use Windows media redirection, included with RDP 7. For  this to work you need to use Windows Media Player 10 or later, and install it on both the local computer, or client access device, and the View desktop.

Scaling up/out? Or genuine performance troubleshooting?

I was reading another article about cloud computing today. Almost all articles and posts seem to focus on how easy it is to add resources to your environment when you need more power.

Before you start to explain to me why this is true, yes, I do agree. It is very easy to add resources to an existing environment. When you use vSphere, Hyper-V or XenServer just add another host to your cluster or datacenter and you have more power that can be used by your machines. You can give virtual machines more CPU power and/or memory, etc. In the end your applications (that’s in the end what’s most important) have more chance for time to run on a shared environment.

My problem with this approach is simple: Aren’t we doing things the wrong way around?

(more…)

VMware View performance issue

As you may have read we are busy implementing a VMware View environment and have encountered numerous chalenges already.

Most of them have been solved by hard and innovative work or the upgrade from VMware View 3.0.1 to 3.1. Especially the upgrade to VMware View 3.1 resulted in a very good user- and administrator experience.

Unfortunately we kept having performance problems using various desktops (Windows XP or Vista). Scrolling through the Helpdesk tool and browsing web pages with moving graphics like Flash was very shaky even to the extend that desktop sessions froze when to much graphical information had to be processed. This was very strange because at another customer site VMware View worked like a charm with identical sizing but different clients (Wise vs Desktop PC).

A colleague, Anthony Winters, spend a lot of time analyzing these problems. The first thing he found out that performance was poor on the desktop but great on his laptop. He quickly eliminated all variables (network, switches, cabling) until he knew for sure the client was the problem.

(more…)

Citrix tuning when running on VMware

After making a P2V of a couple of physical Citrix servers at a client, Anne Jan and I did some tuning for the best performance. Since the servers were on old hardware they now are already faster, but we wanted to get the most out of it. We first removed hardware drivers like Anne Jan’s article mentioned earlier. (more…)

VMware ESX vs Microsoft Hyper-V

On Gabes Virtual World I read an article with the title ‘Unbelievable Hyper-V performance ‘. At first I was a bit shocked by the title. Hyper-V good performance? That the complete opposite to my own experience with Microsofts virtualization attempt. But luckily what Gabe ment was ‘Unbelievable BAD Hyper-V performance ‘.

You can read the complete article here.

Conclusion
A max score of 1,875 VMs per core where VMware ESX on the same hardware does 3,5 VMs per core. Maybe the test is not 100% accurate but with these scores maybe someone should step up and do a real hypervisor performance comparison (same hardware, load, etc).