CONSULTING WHITE PAPER | Citrix XenDesktop
Optimizing Windows XP for XenDesktop
www.citrix.com
Citrix® XenDesktop™ 4.0
CONSULTING WHITE PAPER | Citrix XenDesktop
Contents
Introduction ........................................................................................................................................................ 1
Machine Settings ................................................................................................................................................ 1
Implementing Machine-based Registry Configurations .......................................................................... 1
Recommended Configurations .................................................................................................................... 2
Standard Mode Recommended Configurations........................................................................................ 3
Optional Configurations .............................................................................................................................. 3
Software Agent Configurations ................................................................................................................... 4
User Settings ....................................................................................................................................................... 4
Implementing User-based Registry Configurations ................................................................................. 4
User Profile Best Practices ........................................................................................................................... 5
Recommended Configurations .................................................................................................................... 6
Optional Configurations .............................................................................................................................. 7
Conclusion .......................................................................................................................................................... 9
CONSULTING WHITE PAPER | Citrix XenDesktop
1
Introduction
Citrix XenDesktop is a desktop virtualization solution that delivers a complete Windows desktop
experience as an on-demand service to any user, anywhere. Most large implementations of
XenDesktop thus far have been based on Microsoft Windows XP, although that is expected to
change quickly as Microsoft Windows 7 goes mainstream in the enterprise. Many early adopters of
XenDesktop have faced the challenging task of tuning Windows XP for a hosted VM-based VDI
desktop model. Typically, Windows operating systems are tuned based on whether they are a client
or server operating system. In the case of a hosted VM-based VDI desktop though, Windows XP is
a client operating system operating in more of a traditional server role in the datacenter.
Understanding this duality is just the beginning of optimizing Windows XP for XenDesktop.
While most server-based computing administrators have experience tuning server-based operating
systems like Windows Server 2003 to support hundreds of users, not as much knowledge is available
for tuning a client operating system like Windows XP for running in the datacenter. Citrix
Consulting first addressed this topic in a white paper entitled Best Practices for Citrix XenDesktop with
Provisioning Server which was released for XenDesktop 2.1. This document builds on that white paper
by providing a comprehensive view on optimizing Windows XP for a hosted VM-based VDI
desktop environment offering proven optimizations, providing specific registry values, and
explaining how to implement these configurations in ways that are supported by both Citrix and
Microsoft. These configurations typically add value by enhancing the user experience and increasing
system performance. For example, some of the changes optimize the user experience by enabling
faster logons, reducing unnecessary prompts, and quicker screen updates. Others optimize
performance and increase scalability by reducing unnecessary processor, memory, disk and network
usage.
Machine Settings
Machine settings are easier to implement than user settings as they are typically set once as part of
the base image. However, machine settings are more dependent on the exact deployment scenario,
particularly whether or not Windows XP is deployed on standard mode vDisk images with Citrix
Provisioning Services. Fortunately, many machine-level optimizations for standard mode vDisk
images are already included in the XenConvert Optimizer tool, which is installed as part of the
Provisioning Services target device software. The registry changes included with this tool are
indicated as such below. The software agents frequently installed on each desktop are also covered
in this section. However, strategies for deploying end-user applications to virtual desktops, such as
installing applications locally or streaming applications, are not covered in this document.
Implementing Machine-based Registry Configurations
Most of the configurations recommended in this document are changes to the registry. Registry
changes can be implemented in a number of ways and there is not necessarily one way that is best
for all deployments. Machine-based registry modifications can be set anytime during the base
image preparation or maintenance cycles. The simplest way to implement them is to modify the
CONSULTING WHITE PAPER | Citrix XenDesktop
2
registry manually using “regedit.exe” or creating and executing a “.REG” file. Automated ways
of modifying the registry, including Group Policy or other third-party tools, are also possible. All
registry modifications listed in this document use the “.REG” file syntax so that they can be
easily copied and pasted into a customized “.REG” file.
Caution: All of the registry settings mentioned in this document must be analyzed for benefit and risk to your
environment. Modifying the registry incorrectly can cause serious problems that may require you to reinstall the
operating system. Citrix cannot guarantee that problems resulting from incorrectly modifying the registry can be
solved. Modify the registry at your own risk. Backup the registry or disk image before making changes.
Recommended Configurations
The following registry changes are recommended for all deployment scenarios and would almost
always be desirable in a Windows XP hosted VM-based VDI desktop implementation:
Configuration Optimizer Registry Modification (in REG file format)
Disable Last Access
Timestamp
Yes [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"NtfsDisableLastAccessUpdate"=dword:00000001
Disable Indexing
Service
Yes [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\cisvc]
"Start"=dword:00000004
Disable Wireless
Zero Config. Service
No [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WZCSVC]
"Start"=dword:00000004
Disable Security
Center Service
No [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wscsvc]
"Start"=dword:00000004
Disable Large Send
Offload
No [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BNNS\Parameters]
"EnableOffload"=dword:00000000
Disable TCP/IP
Offload
No [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"DisableTaskOffload"=dword:00000001
Increase Service
Startup Timeout
No [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
"ServicesPipeTimeout"=dword:0002bf20
Disable Windows
Tour
No [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Tour]
"RunCount"=dword:00000000
Hide Hard Error
Messages
No [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows]
"ErrorMode"=dword:00000002
Disable CIFS Change
Notifications
No [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoRemoteRecursiveEvents"=dword:00000001
Disable Logon
Screensaver
No [HKEY_USERS\.DEFAULT\Control Panel\Desktop]
"ScreenSaveActive"="0"
Note: The Optimizer column indicates whether this registry change is included in the XenConvert Optimizer tool
that is installed with the Provisioning Services target device software.
CONSULTING WHITE PAPER | Citrix XenDesktop
3
Standard Mode Recommended Configurations
The next set of registry changes are recommended for images deployed using standard mode
vDisk images with Citrix Provisioning services. Standard mode images are unique in that they are
restored to the original state at each reboot, deleting any newly written or modified data. In this
scenario, certain processes are no longer efficient. These configurations may also apply when
deploying persistent images and in many cases should be implemented in addition to the changes
recommended in the preceding section.
Configuration Optimizer Registry Modification (in REG file format)
Disable Offline
Files
Yes [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache]
"Enabled"=dword:00000000
Disable
Background
Defragmentation
Yes [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction]
"Enable"="N"
Disable
Background
Layout Service
Yes [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout]
"EnableAutoLayout"=dword:00000000
Disable System
Restore
Yes [Software\Policies\Microsoft\Windows NT\SystemRestore]
"DisableSR"=dword:00000001
Disable
Hibernation
Yes [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power]
"Heuristics"=hex:05,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,3f,42,0f,00
Disable Memory
Dumps
Yes [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl]
"CrashDumpEnabled"=dword:00000000
"LogEvent"=dword:00000000
"SendAlert"=dword:00000000
Disable Move to
Recycle Bin
Yes [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\BitBucket]
"UseGlobalSettings"=dword:00000001
"NukeOnDelete"=dword:00000001
Disable Mach.
Acct. Password
Changes
Yes [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters]
"DisablePasswordChange"=dword:00000001
Disable Windows
Update Service
Yes [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv]
"Start"=dword:00000004
Optional Configurations
This last set of machine-based registry changes is optional regardless of whether the image is
deployed as a persistent or standard image. In many cases, the following configurations should
be implemented; however, these configurations should be analyzed for suitability to each unique
environment.
Configuration Optimizer Registry Modification (in REG file format)
Disable Themes
Service
No [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Themes]
"Start"=dword:00000004
CONSULTING WHITE PAPER | Citrix XenDesktop
4
Software Agent Configurations
While the previous subsections have covered optimizations to Windows XP itself, it is also
important to consider the impact of third party agents and other helper applications installed on
Windows XP, many of which run automatically. It is critical to minimize the impact of software
agents wherever possible. An agent consuming a small amount of resources can easily consume
an entire CPU core or gigabytes of memory when the physical server hosts 100+ virtualized
Windows XP desktops. In addition, all of the background processing could negatively affect
user experience, which is critical to the success of a desktop virtualization solution. While this
document does not go into this topic in detail, the following are a few common optimizations to
review.
Remove Unneeded Programs from the Run Key. After installing all third party
applications into the image, it is important to analyze the user and machine “Startup”
paths and “Run” keys (typically, HKLM\Software\Microsoft\Windows\Current
Version\Run). Many common applications, such as Adobe Reader and Java, add helper
applications to these locations so that the software can check for updates and load more
quickly. However, these helper applications are typically undesirable in a hosted VM-
based VDI desktop deployment as they consume resources and can prompt users
unnecessarily. Each application should be tested to ensure that preventing the helper
application from launching automatically does not break the application.
Optimize Antivirus Scanning. It is important to review the antivirus software
configuration. Citrix recommends scanning on write events to local drives only in order
to minimize processing time. It is also recommended to exclude the paging file and print
spool folder. When deploying standard mode vDisk images, Citrix recommends regularly
updating the antivirus signatures in the base image.
EdgeSight Configuration. Citrix recommends additional antivirus configurations when
using EdgeSight. See Citrix Knowledge Center article CTX111062 for more information.
User Settings
Unlike machine settings, user settings must be applied to each user and typically cannot be applied as
part of the base image. In addition, user settings typically do not depend on whether the image is
deployed in private or standard mode; however, the method in which the settings should be applied
can be influenced by the image mode. None of the configurations in this section are included in the
XenConvert Optimizer tool. These factors make user settings more difficult to implement.
Implementing User-based Registry Configurations
Many optimization recommendations suggest overwriting the default user profile of the base
image to implement user-specific settings. When overwriting the default user profile, each new
user receives a copy of the modified default user profile as their initial user profile. This method
has the benefit of being relatively easy to implement. However, this approach has significant
CONSULTING WHITE PAPER | Citrix XenDesktop
5
drawbacks in that it is known to cause several issues, particularly with Windows 7, as well as
being explicitly unsupported by Microsoft. (See http://blogs.technet.com/deploymentguys/
archive/2009/10/29/configuring-default-user-settings-full-update-for-windows-7-and-windows-
server-2008-r2.aspx.) In addition, this approach does not affect users that already have a roaming
profile.
A preferred alternative is to configure each user’s profile “on demand” as the user logs in. These
settings can be implemented using Microsoft Group Policy Preferences or a login script. To
ensure an optimal user experience, this must be implemented in conjunction with persistent user
profiles using a solution such as Citrix Profile Management, Windows roaming profiles, or
another third party solution. With this method, the initial logon may take several additional
seconds for Windows to build the user profile for the first time. After the initial logon, the logon
time will be noticeably reduced for all subsequent logons. Some user settings may not take effect
until the user logs in for the second time. This solution provides very fast logon times to users
while allowing administrators to implement almost any change on the fly without the hassle of
rebuilding profiles.
There are some additional considerations to be aware of, though. First, Windows XP roaming
profiles can only be configured in the properties of each user’s Active Directory account. This
may not be acceptable in most environments as this forces users to have their roaming profile for
every machine on the domain. Second, implementing user settings using Group Policy Objects
with a custom “ADM” template is not recommended as this method cannot modify
REG_BINARY registry values. Lastly, modifying the default user profile directly by mounting
the registry hive is also not recommended as some of the registry keys are overwritten on the first
logon.
User Profile Best Practices
Given that user-based registry settings are stored in the user’s profile, implementing these settings
relies on roaming profiles working optimally. The following best practices ensure that roaming
profiles perform well in your environment.
Use Service Pack 3. Make sure Windows XP Service Pack 3 in installed as there are at
least two bug fixes that resolve very slow login times. (If there is a firm requirement for
SP2, apply Microsoft hotfixes KB899409 and KB941158.)
Use Citrix Profile Management. There is no policy to set a roaming profile path with
Windows XP (Microsoft added this for Vista and later). The only other out-of-the-box
option is to configure the user’s profile (not Terminal Services Profile) in their Active
Directory user account properties, but this would affect the user’s profile for every
system they log into on the domain. This is not sufficient for most environments. Citrix
Profile Management allows administrators to tailor the profile configuration for the
desktop virtualization environment without impacting users when they are outside of the
environment. It can easily be added to a new or existing XenDesktop implementation
and is fully configurable using Group Policy.
CONSULTING WHITE PAPER | Citrix XenDesktop
6
Install UPHClean. This trusted helper program helps ensure user profiles are unloaded
and saved to the network store correctly upon logoff. The latest release of this software
is version 1.6d and can be downloaded from Microsoft’s website. This version only
supports 32-bit operating systems, though. Version 2.0 beta, which is also available,
works with 64-bit operating systems, but this version is in permanent beta as UPHClean
is now an abandoned project. (The functionality of UPHClean is included in Windows
Vista and later.)
Ensure KB941158 is Applied. Although KB941158 is supposed to be included in
Windows XP Service Pack 3, the iedkcs32.dll file is not updated properly in some
environments. Verify the version of this file in the %WINDIR%\system32 folder and
ensure it is at least 17.0.6000.20668. If not, the updated version of the file can be found
in a nested windows directory by using Windows search. Copy the updated version to
the %WINDIR%\system32 and %WINDIR%\system32\dllcache folders. Once the
iedkcs32.dll file is updated, the fix must then be enabled by adding the registry key
documented in Microsoft Knowledge Base article KB941158. This fix may not be
needed if using Internet Explorer 6 or earlier.
Do Not Modify or Replace the Default User Profile. While this shortcut of applying
registry changes to future users may be easy to implement, it is explicitly unsupported by
Microsoft and can cause unexplained permissions and user profile path issues. A more
advantageous approach is to leverage group policy preferences or a logon script to update
only the appropriate registry keys and values. See the preceding section for more details.
Use Userenv and Profile Management Logging. If logon times are longer than
expected, enable all Userenv and Profile Management logging facilities. Look for long
delays during the logon process as potential culprits. By default, both of these write to
the system drive. If a standard mode vDisk image is used, the desktop must not be
rebooted or the log files will be deleted. Once troubleshooting is finished, advanced
logging should be disabled. To enable userenv logging, see Microsoft Knowledge Base
article KB221833. To enable Profile Management logging, see the Citrix eDocs Library
article Setup Logging with Profile Management.
Recommended Configurations
The following registry changes are recommended for all deployment scenarios and would almost
always be desirable in a Windows XP hosted VM-based VDI desktop implementation.
Configuration Registry Modification (in REG file format)
Force Offscreen
Composition for Internet
Explorer
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"Force Offscreen Composition"=dword:00000001
Reduce Menu Show Delay [HKEY_CURRENT_USER\Control Panel\Desktop]
"MenuShowDelay"="150"
CONSULTING WHITE PAPER | Citrix XenDesktop
7
Configuration Registry Modification (in REG file format)
Disable all Visual Effects
except "Use common
tasks in folders" and "Use
visual styles on windows
and buttons"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects]
"VisualFXSetting"=dword:00000003
[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics]
"MinAnimate"="0"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"ListviewAlphaSelect"=dword:00000000
"TaskbarAnimations"=dword:00000000
"ListviewWatermark"=dword:00000000
"ListviewShadow"=dword:00000000
[HKEY_CURRENT_USER\Control Panel\Desktop]
"DragFullWindows"="0"
"FontSmoothing"="0"
"UserPreferencesMask"=hex:90,12,01,80
Disable Desktop Cleanup
Wizard
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDesktopCleanupWizard"=dword:00000001
Disable Auto Searching
Network Printers/Shares
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"NoNetCrawling"=dword:00000001
Disable Screen Saver [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Control Panel\Desktop]
"ScreenSaveActive"="0"
Optional Configurations
This set of user-based registry configurations is optional. In many cases, these configurations
should be implemented; however, these configurations should be analyzed for suitability to each
unique environment.
Configuration Registry Modification (in REG file format)
Disable Windows Sounds [HKEY_CURRENT_USER\AppEvents\Schemes]
@=".None"
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\AppGPFault\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\CCSelect\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\Close\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\DeviceConnect\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\DeviceDisconnect\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\DeviceFail\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\Maximize\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\MenuCommand\.Current]
CONSULTING WHITE PAPER | Citrix XenDesktop
8
Configuration Registry Modification (in REG file format)
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\MenuPopup\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\Minimize\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\Open\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\RestoreDown\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\RestoreUp\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\ShowBand\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemAsterisk\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemExclamation\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemExit\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemHand\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemNotification\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemQuestion\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemStart\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\WindowsLogoff\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\WindowsLogon\.Current]
@=""
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\Navigating\.Current]
@=""
Set Screensaver to Blank [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Control Panel\Desktop]
"SCRNSAVE.EXE"="scrnsave.scr"
Remove Language Bar
(Disable Advanced Text
Services)
[HKEY_CURRENT_USER\Software\Microsoft\CTF]
"Disable Thread Input Manager"=dword:00000001
Remove Shut Down
option from Start Menu
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoClose"=dword:00000001
Reduce Cursor Blink Rate [HKEY_CURRENT_USER\Control Panel\Desktop]
"CursorBlinkRate"="795"
CONSULTING WHITE PAPER | Citrix XenDesktop
9
Conclusion
While XenDesktop is designed to work great out of the box with Windows XP, there are still many
ways to optimize Windows XP further in terms of user experience and system performance. Every
good system implementation must have a level of optimization to utilize the resources in the best
manner possible. By applying this thinking to the Windows XP image, the user should have a better
computing experience while having a smaller impact on the underlying infrastructure.
CONSULTING WHITE PAPER | Citrix XenDesktop
10
Revision History
Revision Change Description Updated By Date
0.1 Initial Draft Kevin Bacon 1/15/2010
0.2 Review Michael Schaeffer 2/01/2010
0.3 Review Daniel Feller / Michael Bogobowicz 2/04/2010
1.0 Final Kevin Bacon 2/06/2010
Citrix Consulting - Americas
Citrix Systems, Inc.
851 W Cypress Creek Road
Fort Lauderdale, FL 33309 USA
Phone: 1-800-393-1888 Option 55
Phone: 1-954-229-6170
Citrix Consulting - Pacific
Citrix Systems Singapore Pte Ltd
8, Temasek Boulevard
#34-02, Suntec Tower 3
Singapore, 038988
Singapore
Citrix Consulting - Europe
Citrix Systems UK, Ltd.
Chalfont House
Chalfont Park, Gerrards Cross
Bucks SL9 0BG
Phone: +44 1753-276-200
Citrix Systems Japan KK
Kasumigaseki Common Gate West Tower 24F
3-2-1, Kasumigaseki, Chiyoda-ku
Tokyo, 100-0013 Japan
About Citrix
Citrix Systems, Inc. (NASDAQ:CTXS) is the leading provider of virtualization, networking and software as a service
technologies for more than 230,000 organizations worldwide. Its Citrix Delivery Center, Citrix Cloud Center (C3) and
Citrix Online Services product families radically simplify computing for millions of users, delivering applications as an
on-demand service to any user, in any location on any device. Citrix customers include the world’s largest Internet
companies, 99 percent of Fortune Global 500 enterprises, and hundreds of thousands of small businesses and prosumers
worldwide. Citrix partners with over 10,000 companies worldwide in more than 100 countries. Founded in 1989, annual
revenue in 2008 was $1.6 billion.
©2009 Citrix Systems, Inc. All rights reserved. Citrix®, Access Gateway™, Branch Repeater™, Citrix Repeater™,
HDX™, XenServer™, XenApp™, XenDesktop™ and Citrix Delivery Center™ are trademarks of Citrix Systems, Inc.
and/or one or more of its subsidiaries, and may be registered in the United States Patent and Trademark Office and in
other countries. All other trademarks and registered trademarks are property of their respective owners.