Back in February, I was engaged for a couple of days, to help a customer pilot the PCoIP protocol using Horizon with View 6, with the primary driver to deliver multimedia and video across WAN links. This post provides a summary of my findings including tools, tweaks, tips and resources I used.
Typically, whilst this is an excellent use case for PCoIP, the customer requirements and constraints were going to test PCoIP capabilities to the full. Also, as best we try to reason with the customer and set out reasonable expectations with these constraints in mind, there’s always the demand for the technology to do more. As expected, PCoIP was being evaluated against other protocols, using RDS Sessions (2008 R2), rather than full Windows 7/8 desktops. Endpoints devices were a mix of new Dell Wyse Thin Clients.
The customer was preparing to test PCoIP from the following locations connected by MPLS:-
- India – 150ms RTT and 10Mbps link
- Canada – 75ms RTT and 200Mbps link
No further information regarding expected concurrent users or current link utilisation was available during this short engagement.
Using the MPLS, at least the PCoIP protocol doesn’t have to traverse the internet and go through numerous additional hops. This provides additional benefits such as reduced latency and having access to those devices across the WAN from the service provider.
In addition, there was a requirement to identify the ‘lowest point’ that could deliver video playback with ‘acceptable’ performance. This doesn’t mean smooth, perfect or flawless playback, just acceptable enough to the end user, with a consistent experience which is essential.
Testing had been carried out previously with another protocol and delivered very good video (to my eyes) at 384Kbps, which I was impressed with to say the least.
WAN Testing and Simulation
At the time, WAN testing with real users was still being lined up and had been delayed, therefore results from real world conditions are still pending. Therefore, initial testing was carried out using some form of WAN simulator software, which the customer had purchased in advance. This tool was called Soft Perfect WAN emulator.
The conditions were set with RTT latency and bandwidth for each location, and I verified some kind of accuracy of the tool, by using ping commands to check for latency and Speedtest.net. The tool was fairly accurate based upon several results, although it was the first time I’ve came across the tool. We didn’t induce packet loss or random packet ordering for the testing, we kept the testing simple and were looking to monitor real WAN testing to discover this information.
There are other alternate WAN emulators available and a more common and popular tool is WANEM which can be downloaded from here
The following PCoIP settings were identified and tuned to find the optimal experience. I’ve added some notes around PCoIP behavior I observed during testing at 384kbps
Note:- View 6.0 has introduced new PCoIP defaults to provide further optimization out of the box and specifically for WAN environments. These have been highlighted in the table.
Note: A number of these settings are dynamic and it’s useful to change these settings whilst a PCoIP session is running, and then monitor (visually) the changes from the PCoIP session.
|PCoIP Maximum Bandwidth Limit||Set a limit on the bandwidth a PCoIP session can use||90000kbps|
|Build-to-lossless||Builds the image to a completely lossless state, pixel perfect image. Only required in special uses cases. Disabling this can reduce bandwidth demands greatly.||Disabled (Previously Enabled in View 5.x)|
|PCoIP Maximum Image Quality||A lower initial maximum image quality will reduce the bandwidth required back at the expense of image quality.||80 (reduced from 90)|
|PCoIP Minimum Image Quality||Trades off display image quality with display frame update.||40 (reduced from 50)|
|Frame Rate Limit||Set a limit on the display update rate. Can reduce bandwidth but as the cost of smooth motion||30|
|Audio Limit||Configures audio compressing. The resulting audio bandwidth will be near or below the limit||500kbps|
PCoIP Tuning – Observations
The PCoIP ADM templates were imported and applied locally on the RDSH server and are downloaded via the Horizon Extras Bundle.
PCoIP Maximum Bandwidth Limit
- If the use case is a bandwidth constrained environment – Configure this setting with the bandwidth limit in mind, to prevent the PCoIP session trying to burst beyond the available link bandwidth, which will degrade performance and likely cause packet loss and poor user experience.
- For example, if the link is 384kbps, configure this setting as 384kbps
- Ideally you wouldn’t limit this too much because PCoIP is a ‘bursty’ protocol and likes to use available network bandwidth to increase performance.
- It’s not recommended to multiply this limit by the number of concurrent users expected. Better to cap a percentage of the link.
PCoIP Maximum Image Quality
- This setting has more impact than ‘Minimum Image Quality’, so initial focus and attention should be here.
- Default of 80 – Can reduce to 70 for WAN environments, however going too low reduces the quality, so it’s a trade-off scenario.
- Reducing this setting will decrease bandwidth used and allow Imaging Frame (FPS) to increase
- FPS will increase slightly but ultimately more available bandwidth = more FPS
PCoIP Minimum Image Quality
- Default of 40 – Can reduce to 30 (lowest) or 35 in congested WAN environments?
- I didn’t notice much visual change here or from observing the PCoIP Statistics Viewer graphs.
Frame Rate Limit
- Default of 30 – If no multimedia required, could reduce to around 12
- On the LAN with no restrictions (PCOIP max), the embedded videos being played in IE, would use around 28-29 FPS for flawless playback
- With the 384 PCoIP Max, reducing this setting to 12, 15 or 18 had little impact in changing the observed FPS numbers, as FPS was dictated by available bandwidth (restricted by the PCoIP Max Session) and Max Image Quality (if this setting was reduced, a slight increase in FPS was observed).
- Default of 500kbps – Should reduce in constrained scenario to 100kbps-150kbps
- At 384kbps bandwidth limit – PCoIP would never increase audio beyond 42kbps
- If I set the PCoIP audio limit to 75, 100, 150 or 200, this made no difference (still 42kbps)
- As soon as the bandwidth limit and Max PCoIP session increased to 1024kbps, audio bandwidth used was double to 80kbps, which was a much more acceptable experience.
- You can download the Teradici Audio driver and apply this if audio is causing issues, although I didn’t implement this. See this good blog post
PCoIP Client Image Cache Size
- Default setting
- Although the cache is for static content only, rather than video or dynamic content, therefore less effective in this scenario.
PCoIP Transport Header
- Default (Medium) – The PCoIP transport header allows network devices to make better prioritization/QoS decisions when dealing with network congestion. The transport header is enabled by default.
- This can be set to ‘Highest’, but it’s not a change I’ve seen recommended before.
To monitor active PCoIP sessions, there are a few options available here.
- Horizon with View (vRealize Operations Manager), previously vCOPs for View (V4V). See this post
- Perfmon or WMI counters inside the Windows session
- PCoIP Session Statistics Viewer – Download from Teradici.com
- PCoIP Config Tool
- Doesn’t seem to work inside Windows 2008 RDS sessions
- PCoIP Log Viewer
- The logs would not parse for View Agent 6.01
I’ve previously always used the last two tools, however since the creator has moved on from VMware, I can appreciate these tools may have not been kept up-to-date, for the latest versions.
Instead, I used the PCoIP Session Statistics Viewer tool from Teradici, it’s easy to use and presents the session data in easy to consume graphs and charts. There is where you can track the tweaks to PCoIP above and see how this impacts the current session.
As the customer was using Windows Server 2008 R2 RDS Sessions via Horizon View, there was some additional tweaks I applied to make sure the server was an optimised as possible for best performance.
- Enabled Windows Desktop Experience
- RDSH Optimiser tool
- See Horizon 6 RDSH Performance and Best Practices
- Applied some Outlook. Office and general Windows tweaks, although the documentation is lacking for the specifics. If you run the tool it will produce a small output of the changes
- VMware Windows Guest OS Optimisation tool using Windows Server 2008 template
Note: Take a snapshot or backup before running and applying the changes these tools implement
- Internet Explorer
- Upgraded from IE9 to IE11
- Latest version of Flash player
- Disable Hardware Acceleration, this can make a noticeable difference.
A few more tools I utilised which can be very helpful, the Teradici.com tools are highly recommended.
- PCoIP Bandwidth Calculator.xls
- PCoIP Session Statistics Viewer (see above)
- Monitor FPS in real-time inside Windows
- Network Emulator\Simulator
- Soft Perfect (shown below).
- PCoIP defaults are pretty accurate for the WAN, only a small amount of tweaking is required.
- Network infrastructure for PCoIP is no 1! PCoIP uses UDP, so UDP packets are always going to have less priority on the network during contention than TCP. There phase is more important and effective than playing around with the PCOIP settings. Consult the resources below.
- LAN performance for video playback from the browser was flawless (as expected), with no PCoIP session restrictions or network simulators.
- Don’t constrain PCoIP too heavily and understand the behaviour (it’s UDP, dynamic and bursty naturally).
- Set user expectation – There’s only so much you can do and achieve using the protocol with limited bandwidth.
- Real WAN testing holds the key, as protocol latency, session reliability and packet loss all come into play.
- Horizon View 6 is missing some form of flash re-direction, which the competing solution had, with the ability to support this using RDS sessions. Horizon View is behind in this respect.
- Despite the above point, real world testing across the WAN, with feedback from the customer adding that PCoIP was out performing the competition.
- PCoIP Protocol Virtual Desktop Network Design Checklist
- This guide is key and should be the first point of optimisation, before any of the above. The network infrastructure and devices are the critical element here, as PCoIP is a network protocol after all!
- VMware View 5 PCoIP Network Optimization Guide
- Drills into the above PCoIP settings, configuration, use cases, scenarios and sizing calculators in detail!
- Horizon 6 RDSH Performance and Best Practices
I can’t recommend these sessions enough, definitely the first place to go for PCoIP, a lot of gold and nuggets from the presenters. You can find my notes from the sessions here