Last year, as COVID-19 was declared a global pandemic, business continuity immediately became a top priority for most organizations as they shifted millions of employees from offices to work-from-home arrangements. Citrix Virtual Apps and Desktops played a major role for many, enabling them to provide employees with secure remote access to company apps and data from any location. Even though employees were isolated, they could stay productive and employers could continue operating with little or no disruption.

With millions working from home, away from their colleagues, collaboration tools took center stage as employees stayed connected through text chat, voice, and video. Microsoft Teams usage exploded, with 145 million daily active users at the end of April.

For many of our customers, their Citrix Virtual Apps and Desktops users are also Microsoft Teams users. When using Teams within a Citrix session, the audio and video from a user’s local device must be transmitted from the endpoint to the virtual desktop session, encoded within the session, and then sent by the Microsoft Teams client to the other party in the call. Once the other party’s audio and video reach the Microsoft Teams client running in the other session, they are decoded and transmitted from the VDA to the local endpoint device for that user to see and hear.

While the Citrix HDX protocol is an incredible remoting protocol developed over 30 years and can easily handle this scenario, putting the virtual desktop session in the middle of the media path is not the most efficient use of the expensive datacenter hardware that hosts your virtual desktops. Media encode/decode operations are very CPU-intensive, so every voice and video call will reduce the number of total users you can support on your virtual desktop infrastructure. This “hair pinning” of the media through your network also unnecessarily strains your network and can offer a less-than-ideal user experience.

In this blog post (and with a little help from some quotes from fellow St. Louisan and baseball great Yogi Berra), I’ll describe how Citrix optimization for Microsoft Teams can increase the scalability of your virtual desktop infrastructure, lower your on-prem hardware or public cloud costs, give your users the best experience with Microsoft Teams, and even improve security.

“It’s like déjà vu all over again”

If you’ve followed Citrix for any length of time, you know that we pioneered optimization of unified communications in virtual desktops through our Lync Optimization Pack in 2012, advanced it with our optimization of Skype for Business in 2015, and evolved it in 2020 with Citrix optimization for Microsoft Teams. While other vendors have recently begun to optimize a unified communications client, Citrix has optimized Microsoft unified communications clients for years. And with Teams, it really is like déjà vu all over again.

With Citrix optimization technology, media processing and communication are offloaded to a media engine installed on the endpoint device as part of Citrix Workspace app, as shown in the following conceptual architecture.

The end user interacts normally with standard Teams installed within the session. But when a voice or video call is initiated, the local media engine is seamlessly engaged to handle the encode/decode of the media and to transmit the media either to the Teams conference server or directly to the other party in the call. This ensures a more direct path for the call media, which can take tremendous load off your virtual desktop hardware and network because the local endpoint is being used to process and transmit the media.

You may ask, “Why not just deploy the Teams client directly to the endpoint?” First, the user experience would not be as good as using a Teams client within the virtual desktop; the user would have to alternate between using apps within the virtual desktop (likely running full screen) and the local Teams client. Also, if users need to upload and download sensitive business files to/from Teams, it would be preferable to share them from the virtual desktop running securely in the data center, not from the users’ local, unmanaged device.

“Nobody goes there anymore because it’s too crowded.”

We don’t want our infrastructure to be so crowded that none of our users one will want to use our services. As a user of Citrix Optimization for Microsoft Teams, I know the user experience is great, but how much does it improve server scalability? I ran some tests to find out. My test setup was as follows:

VDA: Windows Server 2016 VM with Xeon E5-2620 v4 @ 2.10GHz / 8GB RAM.  (Please note, the Citrix Hypervisor hosting the VDA is also hosting nine other VM’s for Citrix Licensing, Citrix Delivery Controller, Active Directory, etc. The Citrix VDA version was 2006, and the Teams version was 1.3.00.21759.)

Endpoint: Windows 10 laptop, with a Core i7-3517U / 8gb RAM, running Citrix Workspace 2009 for Windows (20.9.6.34).

While capturing perfmon metrics on the VDA and the endpoint device, I made video calls from a virtual desktop on the VDA to Teams running on a third device. I forced our HDX RTC Engine on the endpoint to use H.264 and tested resolutions of 240p, 360p, and 720p (Teams’ max resolution). I left the calls open for at least five minutes each, and to ensure that the audio/video decoders would have work to do, I moved around in front of the camera and I had music playing in the room throughout the test. This setup mimics the most Teams common call type — a “talking head.” No other programs were running on the VDA or the endpoint, so the System Processor metrics reflect Teams (VDA) and HDX RTC Engine (endpoint) use.

“You can observe a lot just by watching.”

CPU Utilization

So, what did we observe by watching with Perfmon? On the endpoint, we can see that the System CPU usage increased as we initiated optimized calls from within the VDA. This is expected, as the endpoint has taken over the work of processing the call’s media. As the maximum resolution of the calls increases, the CPU utilization also increases, averaging 8.63 percent for a 240p call, up to 21.19 percent for a 720p call.

Now, more importantly, consider the VDA metrics, which show the average CPU utilization during a pair of 720p test calls, one optimized, the other not optimized:

If we subtract the baseline CPU usage from the averages, the result is the amount of CPU used by Teams on the VDA during the test. For non-optimized Teams, this is 19.4 percent (19.59 minus 0.19), and 0.58 percent for optimized Teams (0.77 minus 0.19). So non-optimized Teams used, on average, just under 20 percent of the system’s CPU to maintain the call. In contrast, the same call, at Teams’ highest level of quality, only required about half of 1 percent of the system CPU on average.

Let’s translate these results into hypothetical user counts. Assuming I want to keep my server at 85 percent average CPU or less in total, with non-optimized Teams, I can only have four users on my server making Teams video calls before maxing it out (85%/ 19.40 = 4.4). With optimized Teams, I can get a whopping 146 users (85%/ 0.58 = 146.55) on the same server.

Obviously, these are theoretical limits obtained in a lab environment where no other processes are running. In your production environment, you’ll have lots of other processes running on the servers, including management agents, other user applications, idle sessions, and more. However, the numbers do show you just how big a difference optimization can make to your server scalability, which translates to a lower cost per user and a better user experience. Plug these numbers into a public cloud calculator for yourself to see just how much you can save optimizing Microsoft Teams with Citrix.

“It ain’t over ‘til it’s over. It’s over!”

Optimizing Microsoft Teams within your virtual desktops can increase your server scalability, reduce costs, and improve user experience. The blog post is over, but if you would like to give your users a better Microsoft Teams experience, and improve security and scalability in your Citrix Virtual Apps and Desktops environment, read more about it in our product documentation, and try it out with the help of our Proof of Concept Guide for MS Team optimization in Citrix Virtual Apps and Desktops environments.