Citrix XenApp Performance Essentials

Citrix XenApp
Performance Essentials
Luca Dentella
Chapter No. 4
"Improving End User Experience"
In this package, you will find:
A Biography of the author of the book
A preview chapter from the book, Chapter NO.4 "Improving End User Experience"
A synopsis of the book’s content
Information on where to buy this book
About the Author
Luca Dentella is an IT architect working for an Italian consulting company, Sorint.lab.
He graduated in Telecommunication engineering from the Polytechnic University
of Milan and he specialized in Windows and virtualization technologies, becoming
both a Microsoft and a VMW are Certified Professional.
In the last five years, he worked mainly for INGDirect, Italy, where he helped to design
and develop the IT infrastructure. Some projects he was involved in include call center
virtualization, design of bank shops infrastructure, and outsourcing part of the
back office.
He also worked as a Java/C# developer, and now he administers Java Application Servers
such as IBM WebSphere and RedHat JBoss, and uses his programming skills to write
scripts and programs for automating administrative tasks.
He designs, implements, and administers XenApp farms for different customers.
I’d like to thank my family and my girlfriend for supporting me during the
writing of this book. Special thanks goes to my colleagues Albino, Aldo,
and Marco who helped me in understanding network and security concepts
and suggested the use of WANem.
For More Information:
Citrix XenApp
Performance Essentials
Citrix XenApp is an application-delivery solution that allows apps to be virtualized,
centralized, and managed in the datacenter.
A critical task every Citrix administrator has to perform is to design and maintain
an infrastructure that performs well; poor performances have a high impact on
users' satisfaction.
What This Book Covers
Chapter 1, Designing a Scalable XenApp Infrastructure, helps IT architects design
a good XenApp infrastructure.
Chapter 2, Monitoring and Improving Server Performances, helps XenApp
administrators monitor XenApp servers and fine-tune them for best performance.
Chapter 3, Optimizing Session Startup, helps XenApp administrators reduce the session
start-up time.
Chapter 4, Improving End User Experience, helps XenApp administrators improve
the end user experience.
Chapter 5, Optimizing for WAN Links, helps XenApp administrators optimize and
test XenApp farms for WAN users.
For More Information:
Improving End User
When I started working with Citrix MetaFrame, the ancestor of XenApp, it was
mainly used to publish business applications, like ERP or mainframe's terminal
emulators, so there was no need for multimedia features.
In the last few years, I needed to publish more and more multimedia applications
to my users. With the adoption of thin clients, all the applications including CAD
applications, media players, and internet browsers, had to run on XenApp servers.
In addition, some business applications now use graphical effects (transitions,
transparencies, and so on) that benefit from hardware acceleration.
In this chapter you'll learn:
How to optimize the Windows GUI for applications published with XenApp
Which features XenApp offers for multimedia redirection
What is Citrix HDX and how to use its features to deliver a high-definition
Optimizing Windows GUI
Changing the default Windows behavior may improve the user experience when the
entire desktop or a single application is delivered by XenApp.
For More Information:
Improving End User Experience
Windows settings
Some optimizations are configured on Windows side.
Menu show delay
Windows normally delays menus before they are displayed. You can reduce the delay
by changing the following registry key:
HKCU\Control Panel\Desktop\MenuShowDelay
The default value on Windows 2008 is 400. You can set it from 0 to 4000 milliseconds.
Internet Explorer offscreen composition
If websites contain animated content, sometimes the content may flicker if viewed
with Internet Explorer running over a Terminal Services session.
You can force IE to render the content offscreen by creating the following registry key:
HKCU\Software\Microsoft\Internet Explorer\Main\Force Offscreen
Composition=00000001 (dword)
With IE9, Microsoft removed the Force Offscreen Composition
setting, so adding the preceding key will affect only IE8 or
earlier versions.
A screensaver running in a XenApp session consumes CPU cycles and is normally
useless. In case you need to lock the user's workstation, a local screensaver would be
a better option. If your policies require a screensaver on the server, use a blank one.
The best way to disable the screensaver is through a Windows GPO applied to your
users. The following screenshot displays disabling screensaver with GPO:
Disabling screensaver with GPO
[ 78 ]
For More Information:
Chapter 4
Auto end tasks
When a user logs off, sometimes an application becomes unresponsive. Windows
presents a dialog with the options of Wait or End task. You can suppress the dialog
and automatically end the unresponsive task with the following registry value:
HKCU\Control Panel\Desktop\AutoEndTasks=1 (REG_SZ)
You can set the maximum wait time before auto ending the task with the
following value:
HKCU\Control Panel\Desktop\WaittoKillAppTimeout=seconds (REG_SZ)
Citrix settings
Other optimizations are configured through the Citrix policies.
Desktop UI – user policy
If you're publishing applications with seamless window mode, the desktop is
hidden from the users. You can therefore disable wallpapers and animations
without affecting the user experience.
Displaying window content while dragging is a feature that consumes memory
and network bandwidth. I usually disable it too. The following screenshot displays
disabling Desktop UI features:
Disabling Desktop UI features
[ 79 ]
For More Information:
Improving End User Experience
Graphics – computer policy
By default, XenApp limits the display memory available for a single session to 32768
kilobytes. If this limit is, reached, XenApp degrades the color depth of the session.
Furthermore, XenApp queues images before sending them to the client. If a queued
image is replaced by another one, XenApp discards the first one and doesn't send it
to the client. This feature is known as image tossing.
The previous settings are included in the Graphics category. I found increasing the
memory limit useful sometimes, especially when working with CAD applications.
If users complain about choppy videos, try disabling the queuing and tossing feature.
Dynamic Windows Preview is a feature Microsoft added in the latest versions of
Windows. By default if you publish applications with seamless window mode, the
client OS can display dynamic previews for those applications. You can disable
this feature to save bandwidth. The following screenshot displays the changing
Graphics settings:
Changing Graphics settings
Visual Display – computer policy
The Visual Display category, as shown in the following screenshot, contains settings
that may improve the responsiveness of the application at the expense of display
quality. So before applying them be sure to perform a test with your users.
With the Max Frames Per Second setting, you can increase/decrease the default
number of frames per second (24). Sometimes you may need to increase it (up to 30
fps) for applications like 3D CAD. On the other hand you could decrease it to save
bandwidth, especially when publishing applications don't require frequent screen
updates (for example, terminal emulators). This setting may greatly affect resources
and bandwidth usage, so be careful and test any changes.
[ 80 ]
For More Information:
Chapter 4
Moving Images and Still Images settings allow you to apply different compression
levels on screen images. You could use these settings if you need to save bandwidth:
Changing Visual Display settings
Citrix HDX
HDX stands for High Definition eXperience. It's more than a technology; it's a brand
that encapsulates several different features, some of which were already previously
available with different names.
Citrix created the HDX brand to group together all the elements that deliver highdefinition experience to XenApp/XenDesktop users. HDX is designed to take
advantage, when possible, of the processing power of end user devices.
HDX MediaStream
HDX MediaStream is a set of features to optimize the delivery of video/audio content.
It offloads, when possible, the rendering of media content to the user device, reducing
server's CPU load and bandwidth usage. Because the media content is processed on
the user's device, the playback is not affected by latency.
Flash redirection
Adobe Flash is a technology adopted in many websites, including YouTube and
other video-hosting services. It's also used in some web applications, for example,
the management console of VMware View.
[ 81 ]
For More Information:
Improving End User Experience
You can configure HDX MediaStream to move the processing of Flash content from
the published Internet Explorer to the end user device. At the moment, this feature
supports only Internet Explorer (versions 7, 8, and 9), not Firefox or Chrome.
To enable Flash redirection, you must satisfy the following requirements:
On the user device, install Receiver for Linux 12.0 or Receiver for
Windows 3.0 or higher
On the user device, install Flash player for other browsers
On the session-host servers, install Flash player for Internet Explorer
Make sure the Flash version on the user device is equal to or higher
than the version on the server
Adobe Flash Player
Adobe published two versions of its Flash Player: one for
Internet Explorer (sometimes known as ActiveX player) and
the other for browsers supporting NPAPI (Netscape Plugin
Application Programming Interface) like Firefox and Chrome.
You need both versions, the first for session-host servers and
the second for user devices.
A category of settings is available in Citrix user policies to enable and configure the
Flash Redirection feature as shown in the following screenshot:
Configuring Flash redirection with Citrix policies
On the client side, you can tune this feature using Windows Group Policy Objects.
[ 82 ]
For More Information:
Chapter 4
An administrative template (.ADM) file is available in the following path:
%Program Files%\Citrix\ICA Client\Configuration\language
or, if you are on a 64-bit system:
%Program Files (x86)%\Citrix\ICA Client\Configuration\language
With XenApp 6.5, Citrix introduced a second generation Flash
redirection, adding intelligent failback mode, that detects
situations in which the feature is unnecessary, and supporting
WAN connections.
Windows Media redirection
XenApp is able to send multimedia files to the client in the original, compressed
format and use the client's resources to decompress and render them. This feature
is similar to the Flash redirection introduced before.
If the user device runs Linux, you must install GStreamer
if your distribution doesn't already include it.
You can enable this feature and tune the buffer size using Citrix computer policies.
The following screenshot displays configuring Windows Media Redirection with
Citrix policies:
Configuring Windows Media Redirection with Citrix policies
[ 83 ]
For More Information:
Improving End User Experience
HDX RealTime
HDX RealTime was designed to optimize interaction between audio peripherals
connected to the user device and applications running on virtual desktops or hosted
in the datacenter.
HDX RealTime supports two different approaches:
Generic HDX RealTime
Optimized HDX RealTime
Generic HDX RealTime
The first approach allows the use of any softphone or unified communication
application without the need to modify it.
Before XenApp 6.5, only the default audio device of the endpoint was available for
a published application, redirected with the standard name Citrix HDX Audio. With
version 6.5, Citrix added a true Plug and Play for audio devices. When you connect a
new device to the endpoint, it's made available to the published applications with its
own name as shown in the following screenshot:
The new Plug and Play functionality in XenApp 6.5
Citrix uses an Optimized-for-Speech codec to compress the audio streams and send
them over the ICA protocol, which supports multiple data streams. By default audio
traffic is assigned the highest priority, ensuring low latency.
[ 84 ]
For More Information:
Chapter 4
If a video stream is also present, it's rendered by the application on the server and
analyzed by Adaptive Display, which dynamically adjusts the compression level
and frame rate to deliver the best possible quality for the available bandwidth.
Make sure to have installed the Hotfix Rollup Pack 1 for
XenApp 6.5 to enable Adaptive Display. At the moment this
feature is not configurable in XenApp using Citrix policies,
but via Windows GPOs.
Optimized HDX RealTime
If you consider a generic softphone or unified communication client, you can
logically split it into three layers: the user interface, the business logic, and the
media engine. The media engine is the layer that handles signaling, encoding,
and decoding of audio and video traffic. The idea behind this approach is to
move the media engine layer to the user device. The Citrix server no longer
needs to handle audio and video streams, reducing bandwidth consumption
and server load.
The business logic and media engine layers still need a way to communicate.
The interprocess communication has to occur over the network on a virtual
channel as shown in the following diagram:
Optimized approach
Generic approach
User device
User interface
User interface
Business logic
Business logic
Media engine
Media engine
User device
Virtual channel
Generic approach versus Optimized approach
Implementing this architecture requires a change in the application. Both Avaya and
Cisco now offer a VDI-optimized version of their VoIP clients.
[ 85 ]
For More Information:
Improving End User Experience
Sometimes, the vendor offers a way a third party could use to modify how calls
are initiated and managed. For example, Citrix used Microsoft APIs to deploy an
optimization pack for Lync (formerly known as Office Communicator).
The optimization pack consists of two components:
Citrix HDX RealTime Media Engine, that runs on the user device
Citrix HDX RealTime Connector, that runs on the server and connects
the Lync client to the media engine
Often system administrators consider VDI solutions like XenApp/XenDesktop or
VMWare View not yet ready for real-time applications like VoIP clients. I used the
Lync optimization pack to publish about one hundred clients. The audio and video
quality is similar to local clients and it didn't require many server resources.
HDX RichGraphics
With the HDX RichGraphics feature, XenApp can optimize the performance of
2D and 3D applications offloading the rendering process to the server's GPU.
By default, XenApp moves the rendering of DirectX and Direct3D applications to
the server's GPU if available. No additional configuration is needed. You can also
enable the offloading of Windows Presentation Foundation (WPF) applications
adding the following registry value:
EnableWPFHook = 1 (REG_DWORD)
in the key:
Monitor Hook
You can offload the rendering of OpenGL applications by installing an optional
XenApp component, OpenGL GPU Sharing Feature Add-on, available on
Citrix's website.
[ 86 ]
For More Information:
Chapter 4
GPU offloading in a virtual environment
To enable GPU offloading, your XenApp servers need a direct connection to the
GPU. If you run the servers in a virtual environment, you must configure the GPU in
pass-through mode. This mode, which is available in Citrix XenServer and VMWare
vSphere (sometimes referred as VMDirectPath I/O), directly connects the graphic
card to a virtual machine.
HDX Monitor
HDX Monitor is a free tool, available on Citrix's website (
hdx-monitor). You can use it to get technical details about HDX and to troubleshoot
any problems. Install the tool on any machine in your domain and enter one of your
XenApp servers as the target.
HDX Monitor displays the status of the different HDX components (Media and Flash
redirection, Audio subsystem, and so on), and for each of them you can obtain status
details and bandwidth usage.
This is a very useful tool to verify which HDX features are actually running. HDX
Monitor also gives you suggestions, warnings and errors about the analyzed system
as shown in the following screenshot:
HDX Monitor's suggestions and warnings
[ 87 ]
For More Information:
Improving End User Experience
A common myth is that desktop and application virtualization technologies are only
good for "office" applications.
With some optimizations and tuning and leveraging technologies provided by Citrix
HDX, you can offer a high definition user experience to your XenApp users. With HDX
Monitor, you can check if all the features are running and inspect any problems.
[ 88 ]
For More Information:
Where to buy this book
You can buy Citrix XenApp Performance Essentials from the Packt Publishing website:
Free shipping to the US, UK, Europe and selected Asian countries. For more information, please
read our shipping policy.
Alternatively, you can buy the book from Amazon,, Computer Manuals and
most internet book retailers.
For More Information:
Download PDF
Similar pages