Introducing the PCoIP Configuration Utility (beta)
Let’s get this out of the way – I’ll be the first to admit this tool needs a better name and I’m open to suggestions but for now let’s talk about what this tool does.
For quite some time internally I have been pushing for some way to dynamically adjust PCoIP tuning parameters while a session is still active. I have a host of ideas that this capability would allow for both admin and end-user, and I would be happy to build the tools to enable those ideas, if only the capability were there. But alas, currently the best we can do is tweak parameters across a session disconnect/reconnect.
“Wait a minute!”, you say, “I thought PCoIP AUTOMATICALLY adjusts session parameters already! Why do we need a tool to do this?”
Well, it does automatically adapt. But sometimes it can use a little help. There’s a reason vSphere exposes advanced parameters, or that sysctl exists on Linux – while both of those products do an excellent job of adapting to workloads in real-time, sometimes you can tune them to better fit a given workload in advance if you know what you’re doing. PCoIP is no different there. It actively measures network conditions and adapts within the envelope it’s given as defined by a handful of parameters. The “art” of tuning PCoIP is knowing how to control those parameters at a macro level and then letting PCoIP adapt itself within them at a micro level. So while the protocol does well on it’s own, we can help it out in certain circumstances when we’re already informed about the network conditions the VDI session is running on.
This need or desire to control PCoIP a bit better often shows itself in a use case where a user works on their VMware View desktop all day in their corporate office (on the LAN), and then they need to access that same desktop remotely (WAN). In this use case, it’s often desirable to reduce certain PCoIP settings when accessing the desktop via the WAN – which in turn reduces the overall “fidelity” of the desktop experience – but allow the settings to remain at their defaults (very high fidelity) when the desktop is accessed via the LAN.
And that’s the catch…
Currently VMware View only allows an either/or method of setting PCoIP parameters on a given desktop. You put the desktop in an OU, you assign the PCoIP GPO to that OU and then you tweak – if you want different settings, well, you create another pool in a different OU, assign the PCoIP GPO, and tweak (differently). Then you entitle the user to both (possibly identical) desktops, and hope that they choose the right one at the right time. Now, there are ways to mitigate this a bit, and I am making it sound as bad as it can possibly be but I’m just trying to prove a point – it’s not easy or pretty to support a use case that requires multiple PCoIP profiles for a given user on a given desktop in VMware View today.
So what can we do?
Well, we know we have to deal with a disconnect/reconnect, so let’s take that as a given. It’s not ideal (some might say it sucks – someone like me for example), but it’s what we’ve got. With that in mind, what we’re looking for here is a tool/utility that will allow us the ability to select a PCoIP profile easily and quickly from inside our desktop. Ideally it should also allow the editing and creation of new profiles so that if conditions should change – WAN could mean 3G, WiFi, W@H – a user has the ability to create an appropriate profile. Lastly, it should probably have some way to measure/show the performance of the connection as it behaves within a given profile.
It just so happens that the PCoIP Configuration Utility does just those things! Rejoice!
PCoIP Configuration Utility
This tool is intended to be dropped into a virtual desktop – and probably started at boot/login if it’s not already running – and it will allow the desktop user to select from a list of PCoIP profiles. The profiles are “applied” by editing the registry and setting the desired values for the PCoIP parameters. You then need to disconnect/reconnect and the new profile will take effect. The tool comes pre-loaded with a few default profiles which you can delete or edit as you see fit. Don’t read too much into the names at this point :) It also allows you to take any existing profile, customize it and then save it under any name you wish.
The utility runs as a systray application so you may need to tweak your settings to insure the icon is always visible (if you want it to be) and all major functionality is accessed via a right-click on the systray icon.
Operation of the tool is fairly straightforward but I’ll cover the menu items here in order for completeness sake:
This menu option will pop out a list of all available PCoIP profiles and you can then simply click on the profile you wish to activate.
This option opens a new window allowing you edit/create/delete profiles:
The values you can adjust here relate directly to the GPO settings (though the wording varies a bit).
- To edit an existing profile just select it from the drop-down list, adjust any parameters as needed, and then click ‘Save Profile’.
- To create a new profile begin with an existing profile, edit it, then type in a new name within the drop-down list and click ‘Save Profile’.
- To delete a profile, select it, and click ‘Delete Profile’
- To remove all existing profiles and reset to the default profile list, click ‘Restore Defaults’
- To close the Profile Editor window, click the close button in the upper right.
Clear Profile Settings
Clicking this menu option will remove all currently applied profile settings, and clear out the value of the “last used” profile that the app will try to re-apply when it is launched. In effect this just reverts to the View defaults OR if followed up by a gpupdate /force will allow for easy reversion to the GPO defaults (if any are applied – it may not be wise to apply a GPO if you are using the utility, more on that later).
Show Session Stats
This menu option will popup a small monitor that will poll the PCoIP WMI sessions stats to provide some general information about the current session:
The window will be “always on top”, can be dragged by clicking it, and is slightly transparent to be less intrusive. Selecting the menu option a second time will hide the monitor window.
A few notes on the stats displayed in the window:
- PCoIP CPU utilization is not showing accurately in the status monitor – it’s higher than it should be when comparing against taskmgr measuring the same process. I am looking into this – it is beta code people :)
- The status monitor only shows “Tx” stats for items where it is relevant. The two values shown are current Tx/Peak Tx, for other items the values are the same – current/peak. In most cases Tx is what you really care about anyway and I didn’t want the window to be any larger than it needed to be.
I am assuming we can all figure out what this menu item does.
Requirements, Issues, Implementation details, etc.
- I developed and tested the app on Win7 64bit but it should work on 32bit systems including XP – if it doesn’t, I need you to tell me.
- .NET 3.5 is required
- You should really only use this with VMware View 5.0 or the 5.1 beta
- Tuning profiles and last used profile are stored in HKCU and in theory should be able to roam with a user to whatever desktop they happen to land on – if you have something setup to allow the profile to roam, that is.
- The utility will request admin access – it needs this to be able to write to HKLM which is where the PCoIP settings are read from. You may need to get clever while launching it if you want to avoid UAC nagging you about it.
- This really is beta-class software. I threw this together in 2-3 days right before I left for PEX. There will be bugs. Find them, get me the steps to reproduce them, and I will fix them. Understand that YMMV, and that you assume all risk for any damage this utility may cause to your VDI environment! Back things up before messing with it please!
So, how does a tool that writes directly to the local registry compete with GPO settings? In this case quite well for the most part. GPO will always “win” eventually, so whatever settings you apply, if they are different from a GPO that is also applied to your desktop, will get overwritten at the next policy refresh. BUT! since the PCoIP server process only reads parameters at session connection, so long as you activate a profile, and disconnect/reconnect BEFORE a policy refresh happens the server will load it’s config from the profile and happily go about it’s business. If a policy refresh comes down and changes the registry settings it won’t matter one bit to the PCoIP server – unless you disconnect (or get dropped). If that happens you need to re-activate the profile you want and disconnect/reconnect again (it sucks, I know). But generally, that should be an infrequent event unless your policy is set to sync quite frequently.
Still, the best advice is to avoid applying a PCoIP GPO to the desktops where you plan to use the utility.
I imagine there are a few ways I can detect if the settings have been changed by a policy refresh and then immediately re-apply the currently active profile but that’s low on the list right now. Thoughts are welcome on this though.
You can grab a copy of the utility here: PCoIPConfig.exe
I am releasing this tool because I hope that some people may find it useful, but also to solicit feedback. In a way I am hoping to foster an angry mob to help me push for truly dynamic configuration of the PCoIP server process. I have described this as wanting people to say “This tool is awesome! But it sucks!” – in reference to it’s perceived usefulness, and the disconnect/reconnect requirement accordingly.
Knowing there are people (customers, partners) who see value in a tool like this will carry much farther than my one, lonely voice. So please, if you find the tool useful, but hate having to disconnect – be vocal. Not just here, but elsewhere too – get on the VMware communities, talk to your VMware reps – show them the tool, explain the issues it attempts to solve, and how it’s close, but not quite ideal.
If truly dynamic configuration of the PCoIP server can be added it opens the door to automatically switching profiles based upon location awareness, new tuning toolsets where you can see the impacts of tuning settings in real-time, new tools for an automated PCoIP health-check, and many other things! I already have the ideas, but until we can avoid the disconnect they’re just not viable. Until then, let’s see where this goes…