l have been fighting with a new RDS (terminal server) install at a big customer for the last few months. They run a line of business app that is written in Visual FoxPro9 and it has some quirks, to say the least. They were running the app on an older Server 2008 terminal server on top of VMware ESXi and we migrated them to a Server 2012 R2 RDS server on top of Hyper-V (again, Server 2012 R2).
The Hyper-V host had been built with a Tiered Storage Space on an Dell T620 configured with as much shiny “go fast” hardware as we could stuff into the box. I built out the RDS server VM using best practices and the thing appeared to be smoking fast. User acceptance testing was performed on the VM (or so I thought) then we picked a weekend for the big bang migration to the new box (did I mention that the whole blasted company runs off the terminal server??? and that migration was essentially one way???). Then production starts on the box and the LOB app is a dog. Uggghhh!
To make a long and painful story short, let’s just say that I tried everything under the sun to get the blasted thing to work better and failed. I also have to say that all efforts were focused against the VFP9 application which, in the end, was actually something of a red herring. The key to solving the problem was to NOT look at VFP9 issues and focus on the terminal server itself, instead.
What finally tweaked me to the fact that it wasn’t a VFP issue is when we started trying things on the same test VM in terms of test without RDS role enabled then test again with RDS role enabled. Doing this lead to very clear results – soon as RDS role was enabled the performance, specially for the VFP9 app, went into the basement. With that in mind I spent a little time with my friend Mr. Google and soon came up with an answer!
It seems Microsoft has “quietly” slipped into RDS server environments a technology that they call “FairShare”. FairShare was originally enabled in Server 2008 R2 at the CPU level and then expanded with the release of Server 2012 to include disk and network, as well. In a nutshell, FairShare is a set of filter drivers that “throttles” CPU, disk and network at the user level so that no one user can hog resources on an RDS box. As soon as the RDS role is enabled in 2012 or 2012 R2 the FairShare filters kick in and they can be a performance killer to things like my clients VFP9 app!
Thankfully, it is reasonably easy to “fix”.
The FairShare CPU settings can be turned off by a GPO setting that you apply at the machine level –> Computer Configuration, Policies, Administrative Templates, Windows Components, Remote Desktop Services, Remote Desktop Session Host, Connections: enable Turn off Fair Share CPU Scheduling.
The disk and network settings are a tad harder to change as you have to make REGISTRY changes on the RDS server itself:
Make the registry changes and reboot and you should be good to go!
Be aware that you have now removed the constraints that Microsoft put in place to keep user sessions form going crazy BUT it is probably a good trade off if you need to get your speed back for particular applications. My customer saw certain functions go from taking over 10 minutes to taking under 2 minutes after we made the changes. And other functions that had taken multiple seconds became “immediate”.
I hope this saves you from hours, days, even months of agony!