You can read more about this from the link in the Citrix Documentation Section below titled ' Optimizing Audio and Video Playback ' So in conjunction with enabling Windows Media Redirection (XenApp 6.5) or HDX MediaStream Multimeda Acceleration (XenApp 6.0) Citrix Policies. You want to enable Audio on the Citrix. XenApp 6.5 and XenDesktop 5.5 introduced a new feature, called multi-stream ICA, that enables use of multiple TCP connections to carry traffic for a Citrix session. Multi-stream ICA is available only when you enable Citrix session.
How many times have you heard this?…. Citrix is slow.
It has to be one of the biggest complaints I hear about Citrix, slow logons, sluggish sessions with typing delays, poor video and sound. This session is all about performance considerations when using Citrix along with some best practices to prevent steady state related performance bottlenecks.
I have a design methodology that simply states that performance can be guaranteed with good design and to me this is simple, never share and never over allocate backend hardware resources and providing you do your math right in your capacity planning and you stick to the best practices covered in this paper you can almost guarantee a fast desktop that in many cases one that will outperform a local PC. Try it…
What are the cause’s slowness?
There are so many things that can cause a Citrix session to slow down but the most obvious are covered here:
- Lack of capacity planning
- Using shared resources
- Session Sharing
- Hypervisor Choices
- Not having any spare capacity
- Active Directory Domain considerations
- Network Bottlenecks
- File Server locations
- Profile Management
- Too many startup processes
- Poor Anti-Virus settings
- Badly set HDX policies
- TCP Offload (under certain circumstances)
Let’s look at each item in isolation
Capacity Planning
There is no black art when it comes to Citrix Capacity Planning, it is in fact very simple math. Of course it does depend on what you are doing with Citrix as the numbers will vary greatly but I am talking about the masses here. I won’t be covering GPU or High end power users, those I will cover in a later paper.
First a few golden rules:
- Do not place end user sessions or desktops on equipment that is shared with other systems where you cannot ring-fence the required resources, examples being a shared SAN on VMWare*.
- Never use memory or CPU ballooning
- Don’t bother splitting up the hard drives unless they can be spread across different dedicated LUNS, ideally you won’t be using a SAN for the Citrix Desktop (Covered later in this paper)
- Make sure the File Servers, Print Servers and user profiles are in the same subnet as the Citrix servers, especially when using profile redirection settings
- Reduce the logon time to be as fast as can be because the servers is under its greatest load during logonlogoff
* Exceptions considered here are if you using products like Atlantis ILIO or Nimble where disk IOPS are measured in the hundreds of thousands.
Here are the magic numbers that you need to remember: Louise hay fontana svjetlosti mi.
If you can allocate theses resources to your Citrix sessions I will guarantee it will pretty fast.
SBCXenApp Sessions (Desktop and App)
- 2GB RAM per session server and 200MB for each session
- No more than 14 users per CPU Core with HT considered
- 5 Disk IOPS per session
- 100 IOPS during logon
- 100 IOPS during Logoff
VDIXenDesktop Desktop (Win 7 or above)
- 2GB RAM per
- No more than 4 users per CPU Core with HT considered
- 25 Disk IOPS per session
- 200 IOPS during logon
- 200 IOPS during Logoff
What does this all mean?
In order to make sense of this we need to translate this down to physical hardware and for the sake of simplicity here I am going to take an average run of the mill mid-range HP Server, say a DL380 Gen 9 with 2 x ten core 2Ghz processors, 128GB RAM with an additional 4 x 1GB NIC along with 8 x 15K 300Gb SAS drives and 2GB Cache RAID Controllers at the cost of around £6,500 What does this give me?
- 128GB RAM (Obvious)
- 40 CPU (with Hyper Threading)
- 1440 Disk IOPS in a RAID 1+0 setup
- 1TB of usable local storage space
- 16GB of network traffic at Full Duplex
What this all comes down to is how many desktopssessions can I run per physical servers?
Let’s work it out:
Hardware Resources Available | ||
Memory | CPU Cores | Disk IOPS |
128000.00 | 40.00 | 1440.00 |
Hardware Resources Required for per SBC session | ||
Memory | CPU Cores | Disk IOPS |
200.00 | 0.08 | 5.00 |
Theoretical Maximum Sessions per server per metric | ||
640.00 | 533.33 | 288.00 |
Hardware Resources Required for per SBC session | ||
Memory | CPU Cores | Disk IOPS |
2000.00 | 0.25 | 25.00 |
64.00 | 160.00 | 57.60 |
As you can see from the chart above Disk IOPS are our biggest bottleneck, not CPU and Memory.
So If you’re running a XenAppSBCRDSH solution we have found that the optimum hardware configuration for each VM is 4 vCPU’s, 12GB RAM, 100GB HDD with a single NIC that is part of multi-NIC bonded network of four NICs. On this VM you you will comfortably get 35 users sessions running concurrently and on each physical server of the specification above will run up of eight of these VM’s on the same server giving you a total of 280 sessions per HP Servers but for peace of mind size it up with 200 user session in mind, knowing there is spare capacity with will be important later. User logons are critical metric also to consider and these servers are capable of handling 14 simultaneous logons at 100 IOPS with a 1440 IOPS capacity
Making the Hardware Cost Per XenApp Desktop = £32.50 per user
Let compare this with VDIXenDesktopVMWare View the numbers will be different because we are publishing many more operating System but this time we will be running Window 78 each with 2GB RAM, 1 vCPU and 25 IOPS and as we can see from the chart above you theoretically get 58 desktops running off one server but then apply our 1 third contingency we are looking realistically to achieve around 40 Desktops per physical server
Making the Hardware Cost Per VDI Desktop = £90 per user (quite a difference)
The choice to select what desktop to run VDI vs SBC will be covered in a separate paper.
So there you have it, for SBCXenApp Desktops you can each server will cope with 200 desktops and for VDI that number comes down to 40.
Using shared resources
In order to guarantee a fast desktop you need to be able to be in control of your back end resources. So many times I have seen customers who have invested heavily on great equipment like NetApp FAS units or Dell EqualLogic believing all of their storage related issues will be resolved. The problem with these types of shared resources are what they are, that is they are shared. If you are running the rest of your systems off this shared storage like SQL, Exchange or file sharing then you cannot guarantee the performance.
Look instead to utilize local storage for the desktop provision but keep the critical core services like the controllers on the shared SAN as these generally do not affect the performance.
Hypervisor Choices
Choosing the right Hypervisor to run Citrix on is very important. There are two levels of virtualisations that we need to think about here. One being the server operating system itself and the second being the virtual desktop, so we are running a virtual desktop on a virtual server and some things can be lost in translation, but about that later. The choice to virtualise Citrix is an old debate today as hardware performance has massively increased over the last few years it makes so much sense to virtualise Citrix today, though there was a time in my life I was dead against it.
There are only really three options when it comes to choosing the virtualization platform to run Citrix on, VMWare, Hyper-V and XenServer. Each of them have their merits, but as a rule I always recommend that the platform of choice for virtual desktops should be Citrix XenServer over VMWare and Hyper-V and the reason being is simple. VMWare and Hyper-V lend themselves very well for over allocation and both of them do that very well achieving excellent consolidation ratios oh and they cost money… Citrix XenServer utilises the Hyper Visor built in to modern CPU’s using a technology called Para-Virtualisation instead of the billions of line of code used with VMWare and Hyper-V which almost bare metal performance and it is free with XenDesktop. There is more to be said about this subject but this will be covered in more details in a separate paper at a later stage. Just leave comments if you have any questions.
Session Sharing
When publishing applications with XenApp enable Session Sharing this means that every user will only use one session which will reduce the load on the back end and improve the performance for the users as they don’t need to open up multiple sessions.
Make sure all applications are available across all servers using App-V where necessary and publish every application with the same sessions settings, i.e. colour depth and sound settings that way the user will always launch applications on their current session and not be logged on to multiple servers and they won’t need to go through the whole logon process every time they launch an application.
Spare Capacity
Where possible, don’t run your equipment to it maximum capacity, try to give yourself a third capacity as contingency on standby to cope with system failures and planned maintenance work. An example being if you are servicing a 900 end user virtual desktop estate build the backend solution to cope with up to 1,200 users (i.e. six session hypervisor servers instead five)
This will make the ongoing maintenance of the estate much easier and provide swing equipment when doing upgrades and maintenance tasks.
Active Directory Domain considerations
I do hate to sometimes mention the obvious but I have seen this issue too many times not mention it here. Make sure Active Directory Sites and Services is set up right with the right subnets defined and that the subnet that your Citrix servers are in are assigned to the right subnet to ensure authentication is local and not left to a random choice or worse still over a WAN connection as this will slow down logons.
Network Bottlenecks
The amount of bandwidth required for end user Citrix users is very low but on the backend the servers will require ample bandwidth and here a few guidelines I would advise you to stick to:
- Use bonded networks for general network traffic, ideally four NICS per server setup with ActiveActive LACP
- Separate the Provisioning Services on a separate VLAN again in bonded LACP Channels
- Ensure the Switch backplane has a minimum of 32GBSec Throughput
- Use Layer 3 switches and use these switches as the Gateway
- Use Citrix Netscalers for internal load balancing
File Server Considerations
There a few things to consider with your file servers with Citrix that could affect performance:
- Make sure that the file servers that are being used for Citrix Profiles and redirection are in the same subnet as the Citrix Session servers to ensure they don’t need to traverse a gateway.
- Consider the amount of storage you need and the IOPS per session especially when re-directing
- Use monitoring to keep an eye on disk queue lengths and set up alerting if the queue lengths go above 1.5 as that will significantly affect performance
- When using DFS make sure the DFS servers subnets are defined in Active Directory Sites and Services
Profile Management
Profile management is a really big subject which will be covered in a later paper. The speed of logon will dramatically effect Citrix performance due to the excessive load that logging on places on system. Here are some best practices:
- Use a Mandatory profile for all users stripped off all unnecessary junk which can be reduced in size to around 256K. This makes for an almost instant logon
- Hardcode in redirection directly in the Mandatory profile
- Use drive letters for redirection do not use UNC paths to eliminate SMB limitations
- Make sure profiles are cached locally on the Citrix servers and deleted at log off.
Too many startup processes
This is just a basic rule that gets overlooked too often. Eliminate all unnecessary startup processes run when a user logs on:
- Delete everything in the All UsersStartup Folder
- Delete all entries in the registry key HKLMSoftwareMicrosoftWindowsCurrentVersionRun
Poor Anti-Virus settings
Getting the Anti Virus settings wrong can severely affect the speed of the Citrix servers. Follow these rules to give a AV a fighting chance without killing performance:
- On-Access Scan set Only on writes
- Sensitivity set Heuristic
- Scheduled Full Scans on Session Hosts
- I highly Recommended these exclusions are set:
- Windowssystem32spoolsv.exe
- Windowssystem32csrss.exe
- Windowssystem32winlogon.exe
- Windowssystem32userinit.exe
- Windowssystem32smss.exe
- Program FilesCitrixGroup PolicyClient-Side ExtensionCitrixCseEngine.exe
- Program Files (x86)CitrixSystem32wfshell.exe
- Program Files (x86)Citrixsystem32CpSvc.exe
- Program Files (x86)CitrixSystem32CtxSvcHost.exe
- Program Files (x86)Citrixsystem32mfcom.exe
- Program Files (x86)CitrixSystem32CitrixImaImaSrv.exe
- Program Files (x86)CitrixSystem32CitrixImaIMAAdvanceSrv.exe
- Program Files (x86)CitrixHealthMonHCAService.exe
- Program Files (x86)CitrixStreaming ClientRadeSvc.exe
- Program Files (x86)CitrixStreaming ClientRadeHlprSvc.exe
- Program Files (x86)CitrixXTEbinXTE.exe
- Program FilesCitrixIndependent Management ArchitectureRadeOffline.mdb
- %AppData%ICAClientCache (if using pass-through authentication)
HDX policies
Citrix High Definition Experience policies can make a large number Improvements that can really improve the virtual desktop experience from redirecting video and Flash to be rendered on the local device for desktop like performance to USB and Microphone optimizations as well as providing additional tools for Microsoft Lync. There is no better virtual desktop platform than Citrix if you are looking to use Lync. Here are my recommended general guidelines:
- Configure HDX MediaStream Flash Redirection – HDX MediaStream Flash Redirection allows you to move the processing of most Adobe Flash content from Internet Explorer on the server to LAN- and WAN-connected users’ Windows and Linux devices.
- Configure Audio – You configure audio through the Policies node of Citrix Studio and You control the followings settings for the audio features through the Citrix User Policy settings:
- Audio Plug-n-Play (XenApp only)
- Audio quality
- Client audio redirection
- Client microphone redirection
- Audio redirection bandwidth limit
- Audio redirection bandwidth limit percent
- Audio over UDP Real-timeTransport (XenDesktop only)
- Audio UDP Port Range (XenDesktop only)
- Configure Video Conferencing with HDX RealTime Webcam Video Compression
- Configure HDX RealTime to provide your users with a complete desktop multimedia conferencing feature.
- Configure HDX 3D – HDX 3D allows graphics-heavy applications running on XenApp to render on the server’s graphics processing unit (GPU). By moving DirectX, Direct3D and Windows Presentation Foundation (WPF) rendering to the server’s GPU
- Enable XenApp 6.5 OpenGL GPU Sharing Feature Add-on – This feature add-on to XenApp 6.5 enables graphics processing unit (GPU) hardware rendering of OpenGL applications in Remote Desktop sessions
- Assigning Priorities to Network Traffic – With XenApp and XenDesktop, priorities are assigned to network traffic across multiple connections for a session with quality of service (QoS)-supported routers.
- Add Dynamic Windows Preview Support – With the Dynamic Windows Preview feature enabled, the following Windows Aero preview options are available to XenApp users with published applications:
- Taskbar Preview – In a single-monitor configuration, when the cursor hovers over a window’s taskbar icon, an image of that window appears above the taskbar
- Windows Peek – When the cursor hovers over a taskbar preview image, a full-sized image of the window appears on the screen
- Flip – When the user presses ALT+TAB, small preview icons are shown for each open window.
- Flip 3D – When the user presses TAB+Windows logo key, large images of the open windows cascade across the screen.
- Configuring Read-Only Access to Mapped Client Drives – With the Citrix User Policy setting Read-only client drive access, you can control whether users can copy files from their virtual environments to their user devices.
TCP Offload
You may not have heard of this one, but it has caused so many problems I am going to mention it here and that is problems with TOES cards.
What is a TOE Card?
A TOE card is a network adapter that has a built in TCP Offload Engine (hence the name TOE) and pretty much every server today will have TOE cards. Now these are great in principle as they can really improve network performance by taking some of the load from the operating system but they can sometimes cause issues on virtual machine, let me give you an example.
I had a problem at a major global bank I was working for rolling out XenApp, all went fine until we got to Tokyo. I could not get the systems in Tokyo to ping the Citrix servers hosted in London but they could ping any other servers in London, just the Citrix servers. My immediate reaction was it had to be a firewall right? After a bit of too and froing I had to acknowledge it was a Citrix issue so my trusty tool called Wireshark was brought in to action and what it showed me was that packets were being re-transmitted thousands of time and eventually dropped. What was going on? After a bit of digging I discovered that this bank had reduced their WAN MTU for the GRE tunnel they were running to Tokyo which is a perfectly normal and recommended thing to do for GRE however because the TCP Offload was trying to negotiate the MTU size which cause thousands of re-transmits the packets never made it to the Citrix session Servers. This is an example how things can get lost in translation from physical to virtual. I was running these Citrix Servers on a VMWare cluster and once the VMWare tools were installed they will detect the TOE card and attempt to use it as it did on this occasion so we had a virtual NIC and a Physical NIC both attempting to use the TCP offload engine which failed. Disabling the TCP offload on the VM instantly fixed the issue. I have also seen slow network issues and again disabling the offload engine has rectified the problem.
Summary
I hope you find this guide useful, it is not exhaustive but it will cover most of your Citrix related performance problems and you will find that they will come down to one two things, [1 stupidity] that being where the servers are not sized up properly or the file server that everyone uses is on a 10MB WAN link 100 miles away or user profiles have bloated to over 100MB etc. [2] Stuff gets lost in translation from Physical to virtual. The conversion from traditional PC’s to virtual desktops introduces new IT challenges that unless you are experienced in you not have considered like profiles and printing.
Final thought, remember there are the P’s that you need to get right in Citrix, Performance, Printing and Profiles. 2020 Marathi Movies List | Upcoming New Marathi Movies .... Get these right and you will have a happy user base.
Brett Loveday
Learn how to use Microsoft Teams Optimization for Citrix. Citrix Virtual Apps and Desktops, along with Citrix SD-WAN, can optimize Microsoft Teams and provide a great user experience.
Now organizations can centrally deploy Microsoft Teams within their virtual environments and deliver a fully-featured Microsoft Teams experience, but also giving IT admins the benefits of centralized management.
Citrix delivers optimization for desktop-based Microsoft Teams using Citrix Virtual Apps and Desktops and Citrix Workspace app. By default, we bundle all the necessary components into Citrix Workspace app and the Virtual Delivery Agent (VDA). ( Microsoft Teams Optimization with Citrix )
Our optimization for Microsoft Teams contains VDA-side HDX services and API to interface with the Microsoft Teams hosted app to receive commands. These components open a control virtual channel (CTXMTOP) to the Citrix Workspace app-side media engine. The endpoint decodes and renders the multimedia locally. Reverse seamless snaps-in the local Citrix Workspace app window back into the hosted Microsoft Teams app.
Authentication and signaling occurs natively on the Microsoft Teams-hosted app, just like the other Microsoft Teams services (for example chat or collaboration). Audio/video redirection doesn’t affect them.
CTXMTOP
is a command and control virtual channel. That means that media is not exchanged between the Citrix Workspace app and the VDA.
Only Client-fetch/client-render is available.
Microsoft Teams installation
To start using Microsoft Teams Optimization for Citrix. Citrix recommends you to follow the Microsoft Teams machine-wide installation guidelines and avoid using the .exe installer that installs Teams in Appdata
. Instead, install in C:Program Files (x86)MicrosoftTeams
by using the ALLUSER=1 flag from the command line. In this mode, the Teams application doesn’t auto-update whenever there is a new version. We recommend this mode for non-persistent environments. For more information, see Install Microsoft Teams using MSI (VDI Installation section).
If you have dedicated persistent VDI environments and you want the Teams application to auto-update and would prefer Teams to install per-user under Appdata/Local
, use the .exe installer or the MSI without ALLUSER =1.
If using Citrix App Layering to manage VDA and Microsoft Teams installations in different layers, deploy this registry key on Windows before installing Teams with ALLUSER =1:
HKEY_LOCAL_MACHINESOFTWARECitrix
Or
HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeCitrix
Create an empty registry key named PortICA
(leave the default Name, Type, and Data).
Profile Management recommendations
When the ALLUSER =1
flag is passed to the MSI from the command line, the Teams app installs under C:Program Files
(~300 MB). The app uses AppDataLocal
for logs and AppDataRoamingMicrosoftTeams
for user specific configurations, caching of elements in the user interface, and so forth.
System requirements
Minimum version – Delivery Controller (DDCs) 1906.2:
Supported operating systems:
- Windows Server 2019, 2016, 2012R2 Standard and Datacenter Editions, and with the Server Core option
Minimum version – Virtual Delivery Agents (VDAs) 1906.2:
Supported operating systems:
- Windows 10 64-bit, minimum versions 1607 up to 1909.
- Windows Server 2019, 2016, and 2012 R2 (Standard and Datacenter Editions).
Requirements:
- BCR_x64.msi – the MSI that contains the Microsoft Teams optimization code and starts automatically from the GUI. If you’re using the command line interface for the VDA installation, don’t exclude it.
Recommended version – Citrix Workspace app 2002 for Windows and Minimum version – Citrix Workspace app 1907 for Windows: Samsung gts5230 wifi app download.
- Windows 7, 8, and 10 (32-bit and 64-bit editions, including Embedded editions)
- Windows 10 IoT Enterprise 2016 LTSB (v1607) and 2019 LTSC (v1809)
- Endpoint requirement: Approximately 2.2–2.4 GHz dual core CPU that can support 720p HD resolution during a peer-to-peer video conference call.
- Dual or quad-core CPUs with lower base speeds (~1.5 GHz) equipped with Intel Turbo Boost or AMD Turbo Core that can boost up to at least 2.4 GHz.
- HP Thin Clients verified: t630/t640, t730/t740, mt44/mt45.
- Dell Thin Clients verified: 5070, 5470 Mobile TC.
- 10ZiG Thin Clients verified: 4510 and 5810q.
- For a complete list of verified endpoints, see Thin Clients.
- Citrix Workspace app requires a minimum of 600 MB free disk space and 1 GB RAM.
- Microsoft .NET Framework minimum requirement is version 4.6.2. Citrix Workspace app automatically downloads and installs .NET Framework if it is not present in the system.
Enable optimization of Microsoft Teams
To enable optimization for Microsoft Teams, use the Studio policy described in Microsoft Teams redirection policy (it is ON by default). In addition to this policy being enabled, HDX checks to verify that the version of Citrix Workspace app is equal to or greater than the minimum required version. If you enabled the policy and the Citrix Workspace app version is supported, the HKEY_CURRENT_USERSoftwareCitrixHDXMediaStreamMSTeamsRedirSupport registry key is set to 1 automatically on the VDA. The Microsoft Teams application reads the key to load in VDI mode.
If you click About > Version, the Optimized for Citrix legend displays
If you don’t see Optimized for Citrix, exit Teams by right clicking on the notification area icon and restart.
Citrix HDX Optimization for Microsoft Teams
Optimizing User Sessions For Xenapp 6all About Citrix Download
These components are by default, bundled into Citrix Workspace app and the Virtual Delivery Agent (VDA)
Optimizing User Sessions For Xenapp 6all About Citrix Using
Call Flow
Optimizing User Sessions For Xenapp 6all About Citrix Free
- Launch Microsoft Teams.
- Teams authenticates to O365. Tenant policies are pushed down to the Teams client, and relevant TURN and signaling channel information is relayed to the app.
- Teams detects that it is running in a VDA and makes API calls to the Citrix JavaScript API.
- Citrix JavaScript in Teams opens a secure WebSocket connection to WebSocketService.exe running on the VDA (127.0.0.1:9002). WebSocketService.exe runs as a Local System account on session 0. WebSocketService.exe performs TLS termination and user session mapping, and spawns WebSocketAgent.exe, which now runs inside the user session.
- WebSocketAgent.exe instantiates a generic virtual channel by calling into the Citrix HDX Browser Redirection Service (CtxSvcHost.exe).
- Citrix Workspace app’s wfica32.exe (HDX engine) spawns a new process called HdxTeams.exe, which is the new WebRTC engine used for Teams optimization.
- HdxTeams.exe and Teams.exe have a 2-way virtual channel path and can start processing multimedia requests.—–User calls——
- Peer A clicks the call button. Teams.exe communicates with the Teams services in Azure establishing an end-to-end signaling path with Peer B. Teams asks HdxTeams for a series of supported call parameters (codecs, resolutions, and so forth, which is known as a Session Description Protocol (SDP) offer). These call parameters are then relayed using the signaling path to the Teams services in Azure and from there to the other peer.
- The SDP offer/answer (single-pass negotiation) and the Interactive Connectivity Establishment (ICE) connectivity checks (NAT and Firewall traversal using Session Traversal Utilities for NAT (STUN) bind requests) complete. Then, Secure Real-time Transport Protocol (SRTP) media flows directly between HdxTeams.exe and the other peer (or O365 conference servers if it is a Meeting).