WINDOWS 2008 R2 REMOTE DESKTOP AND XENAPP 6 TUNING TIPS UPDATE  

6 December, 2010 (41336 reads)

Following the great article Terminal Server & XenApp Tuning Tips published on this website by Pierre Marmignon, this article defined all tips that I’ve found, test and validate for tuning Windows 2008 R2 and XenApp6.

Please note that :
–       These informations are provided “as is” and that using these tips is at your own risks.
–       All this tuning tips have been tested and validated only on VMs running on Vmware Vsphere 4, let us know your feeback related to any other platform (either Hypervisor or physical server).
Windows 2008 R2 OS Tuning Tips for Remote Desktop Service and XenApp 6
 
Registry Hive
Value
Type
Data
Purpose(s)
HKLMSYSTEMCurrentControlSetServicesTcpipparameters
 KeepAliveTime
 REG_DWORD
180000
Determines how often TCP sends keep-alive transmissions
HKLMSYSTEMCurrentControlSetServicesTcpipparameters
 KeepAliveInterval
 REG_DWORD
 100
Determines how often TCP repeats keep-alive transmissions when no response is received
HKLMSYSTEMCurrentControlSetServicesTcpipparameters
 TcpMaxDataRetransmissions
 REG_DWORD
 10
Determines how many times TCP retransmits an unacknowledged data segment on an existing connection
HKLMSystemCurrentControlSetServicesLanmanServerParameters
 MaxWorkItems
 REG_DWORD
 512
Server Service Optimization
HKLMSystemCurrentControlSetServicesLanmanServerParameters
 MaxMpxCt
 REG_DWORD
 2048
Server Service Optimization
HKLMSystemCurrentControlSetServicesLanmanServerParameters
 MaxFreeConnections
 REG_DWORD
 100
Server Service Optimization
HKLMSystemCurrentControlSetServicesLanmanServerParameters
 MinFreeConnections
 REG_DWORD
 32
Server Service Optimization
HKLMSystemCurrentControlSetServicesLanmanWorkstationParameters
 UtilizeNTCaching
 REG_DWORD
 0
Disable Caching
HKLMSYSTEMCurrentControlSetServicesMRXSmbParameters
 OplocksDisabled
 REG_DWORD
 1
Disables Opportunistic Locking
HLMSYSTEMCurrentControlSetServicesLanmanworkstationParameters
 UseOpportunisticLocking
 REG_DWORD
 0
Disables Opportunistic Locking
HKLMSYSTEMCurrentControlSetServicesLanmanserverParameters
 EnableOplocks
 REG_DWORD
 0
Disables Opportunistic Locking
HKLMSYSTEMCurrentControlSetServicesTcpipparameters
EnableRSS
 REG_DWORD
0
Disable Receive Side Scaling
HKLMSYSTEMCurrentControlSetServicesTcpipparameters
EnableTCPA
 REG_DWORD
0
Disable TCP-acceleration
HKLMSYSTEMCurrentControlSetServicesTcpipparameters
EnableTCPChimney
 REG_DWORD
0
Disable TCP Chimney Offload
HKLMSYSTEMCurrentControlSetServicesLanmanWorkstationParameters
DisableBandwidthThrottling
 REG_DWORD
1
The default is 0. By default, the SMB redirector throttles throughput across high-latency network connections in some cases to avoid network-related timeouts. Setting this registry value to 1 disables this throttling, enabling higher file transfer throughput over high-latency network connections
HKLMSystemCurrentControlSetServicesLanmanWorkstationParameters
 MaxThreads
 REG_DWORD
 17
Maximum Concurrent Threads
HKLMSYSTEMCurrentControlSetServicesLanmanWorkstationParameters
DisableLargeMtu
 REG_DWORD
0
The default is 1. By default, the SMB redirector does not transfer payloads larger than approximately 64 KB per request. Setting this registry value to 0 enables larger request sizes, which can improve file transfer speed.
HKLMSYSTEMCurrentControlSetServicesTcpipparameters
 EnableWsd
 REG_DWORD
 0
The default is 1 for client operating systems. By default, Windows Scaling Diagnostics (WSD) automatically disables TCP receive window auto tuning when heuristics suspect a network switch component might not support the required TCP option (scaling). Setting this registry setting to 0 disables this heuristic and allows auto tuning to stay enabled. When no faulty networking devices are involved, applying the setting can enable more reliable high-throughput networking via TCP receive window auto tuning. For more information about disabling this setting
HKLMSYSTEMCurrentControlSetServicesLanmanWorkstationParameters
FileInfoCacheEntriesMax
 REG_DWORD
32768
The default is 64 with a valid range of 1 to 65536. This value is used to determine the amount of file metadata that can be cached by the client. Increasing the value can reduce network traffic and increase performance when a large number of files are accessed
HKLMSYSTEMCurrentControlSetServicesLanmanWorkstationParameters
DirectoryCacheEntriesMax
 REG_DWORD
4096
The default is 16 with a valid range of 1 to 4096. This value is used to determine the amount of directory information that can be cached by the client. Increasing the value can reduce network traffic and increase performance when large directories are accessed
HKLMSYSTEMCurrentControlSetServicesLanmanWorkstationParameters
FileNotFoundCacheEntriesMax
 REG_DWORD
32768
The default is 128 with a valid range of 1 to 65536. This value is used to determine the amount of file name information that can be cached by the client. Increasing the value can reduce network traffic and increase performance when a large number of file names are accessed.
HKLMSYSTEMCurrentControlSetServicesLanmanWorkstationParameters
MaxCmds
 REG_DWORD
32768
The default is 15. This parameter limits the number of outstanding requests on a session. Increasing the value can use more memory, but can improve performance by enabling deeper request pipelining. Increasing the value in conjunction with MaxMpxCt can also eliminate errors encountered due to large numbers of outstanding long-term file requests, such as FindFirstChangeNotification calls. This parameter does not affect connections with SMB 2 servers.
Windows 2008 CPU Tuning (for VM only)
 
Because I’m working with VMware VSphere Server 4, I Supposed that the Hypervisor manage my processor and I don’t want to have any CPU management in the VM, I force all my VM to the “min  Power Scheme“  (High Performance) with the following command “owercfg -setactive scheme_min“
And force my Processor Performance Boost Policy, Minimum and Maximum Processor Performance State and Processor Performance Core Parking Maximum and Minimum Cores to the maximum. (http://www.microsoft.com/whdc/system/sysperf/Perf_tun_srv-R2.mspx)
The following commands set Processor Performance Boost Policy to 100 percent on the current power plan:
Powercfg -setacvalueindex scheme_current sub_processor 45bcc044-d885-43e2-8605-ee0ec6e96b59 100
Powercfg -setactive scheme_current
The following commands set Processor Performance State parameters to 100 %
Powercfg -setacvalueindex scheme_current sub_processor 893dee8e-2bef-41e0-89c6-b55d0929964c 100
Powercfg -setactive scheme_current
Core parking is a new feature in Windows Server 2008 R2. The processor power management (PPM) engine and the scheduler work together to dynamically adjust the number of cores available to execute threads, to turn off core parking, set the Minimum Cores parameter to 100 percent by using the following commands:
Powercfg -setacvalueindex scheme_current sub_processor bc5038f7-23e0-4960-96da-33abaf5935ec 100
Powercfg -setactive scheme_current
Additional Windows Explorer Tuning
 
Registry Hive
Value
Type
Data
Purpose(s)
HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesExplorer
 UseDesktopIniCache
 REG_DWORD
 1
HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesExplorer
 NoRemoteRecursiveEvents
 REG_DWORD
 1
HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesExplorer
 NoRemoteChangeNotify
 REG_DWORD
 1
HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesExplorer
 StartRunNoHOMEPATH
 REG_DWORD
 1
HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesExplorer
 NoRecentDocsNetHood
 REG_DWORD
 1
HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesExplorer
 NoDetailsThumbnailOnNetwork
 REG_DWORD
 1
HKLMSystemCurrentControlSetServicesMRXSmbParameters
 InfoCacheLevel
 REG_DWORD
 16
HKCR*shellexPropertySheetHandlersCryptoSignMenu
 SuppressionPolicy
 REG_DWORD
 1048576
HKCR*shellexPropertySheetHandlers{3EA48300-8CF6-101B-84FB-666CCB9BCD32}
 SuppressionPolicy
 REG_DWORD
 1048576
HKCR*shellexPropertySheetHandlers{883373C3-BF89-11D1-BE35-080036B11A03}
 SuppressionPolicy
 REG_DWORD
 1048576
HKLMSOFTWAREMicrosoftWindowsCurrentVersionexplorerSCAPI
 Flags
 REG_DWORD
 1051650
HKLMSYSTEMCurrentControlSetControlSession Manager
 SafeDllSearchMode
 REG_DWORD
 1
HKLMSYSTEMCurrentControlSetControlSession Manager
 SafeProcessSearchMode
 REG_DWORD
 1
Windows 2008 R2 – RDP Tuning  
Registry Hive
Value
Type
Data
Purpose(s)
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TcpUserOverrideControl PanelDesktop
 AutoEndTasks
 REG_SZ
 1
Determines whether user processes end automatically when the user either logs off.
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TcpUserOverrideControl PanelDesktop
 WaitToKillAppTimeout
 REG_SZ
 20000
Determines how long the system waits for user processes to end after the user attempts to log off
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TcpUserOverrideControl PanelDesktop
 MenuShowDelay
 REG_SZ
 10
Changes the Start menu display interval
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TcpUserOverrideControl PanelDesktop
 CursorBlinkRate
 REG_SZ
 -1
Specifies how much time elapses between each blink of the selection cursor
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TcpUserOverrideControl PanelDesktop
 DisableCursorBlink
 REG_DWORD
 1
Enables / Disables Cursor Blink
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TcpUserOverrideControl PanelDesktop
 DragFullWindows
 REG_SZ
 0
Specifies what appears on the screen while a user drags a window / Only the outline of the window moves
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TcpUserOverrideControl PanelDesktop
 SmoothScroll
 REG_DWORD
 0
Scrolls using smooth scrolling
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TcpUserOverrideControl PanelDesktop
 Wallpaper
 REG_SZ
 (none)
Sets Wallpaper to “None”
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TcpUserOverrideControl PanelDesktopWindowsMetrics
 MinAnimate
 REG_SZ
 0
Disabled. Window does not animate while being resized
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TcpUserOverrideControl PanelDesktop
 InteractiveDelay
 REG_DWORD
 40
Optimizes Explorer and Start Menu responses Times
XenApp 6.0 – ICA tuning
  
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsICA-TcpUserOverrideControl PanelDesktop
 AutoEndTasks
 REG_SZ
 1
 Determines whether user processes end automatically when the user either logs off.
Registry Hive
Value
Type
Data
Purpose(s)
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsICA-TcpUserOverrideControl PanelDesktop
 WaitToKillAppTimeout
 REG_SZ
 20000
Determines how long the system waits for user processes to end after the user attempts to log off
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsICA-TcpUserOverrideControl PanelDesktop
 MenuShowDelay
 REG_SZ
 10
Changes the Start menu display interval
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsICA-TcpUserOverrideControl PanelDesktop
 CursorBlinkRate
 REG_SZ
 -1
Specifies how much time elapses between each blink of the selection cursor
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsICA-TcpUserOverrideControl PanelDesktop
DisableCursorBlink
REG_DWORD
 1
Enables / Disables Cursor Blink
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsICA-TcpUserOverrideControl PanelDesktop
 DragFullWindows
 REG_SZ
 0
Specifies what appears on the screen while a user drags a window / Only the outline of the window moves
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsICA-TcpUserOverrideControl PanelDesktop
 SmoothScroll
 REG_DWORD
 0
Scrolls using smooth scrolling
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsICA-TcpUserOverrideControl PanelDesktop
 Wallpaper
 REG_SZ
 (none)
Sets Wallpaper to “None”
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsICA-TcpUserOverrideControl PanelDesktopWindowsMetrics
 MinAnimate
 REG_SZ
 0
Disabled. Window does not animate while being resized
HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsICA-TcpUserOverrideControl PanelDesktop
 InteractiveDelay
 REG_DWORD
 40
Optimizes Explorer and Start Menu responses Times
Please note that using these tips is at your own risks.
All these tips have been test with XenApp6 server running on VMware Vsphere 4 and should be test on your own environment.
Sources :
Author : Julien Sybille
CCEA & CCA XenDesktop
14 comments
By: Jonathan Pitre (JakeLD)
10 December, 2010
Very nice article Julien!

According to Thomas Koetzing paper on “Optimizing Logon and Logoff 1.4” available at http://www.thomaskoetzing.de/index.php?option=com_docman&task=doc_download&gid=135

the registry key HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TcpUserOverride dosen’t work anymore with Windows 2003 and 2008/2008 R2 I assume.

Here what he had to say on page 22: “With Windows 2003 those global keys don’t work anymore and has to be set on a per user basis.”

I tested it my self with existing profiles and it didn’t work…but I just read this morning that the profile must be NEW. So who’s right, you or Thomas ? 🙂

Also I suggest the following registry keys:

HKLMSSYSTEMCurrentControlSetControlProcessor
Key: “Capabilities” (dword)
Value: 0007e666
http://support.microsoft.com/kb/2000977

HKLMSYSTEMCurrentControlSetServicesTCPIPParameters
Key: “DisableTaskOffload” (dword)
Value: “1”

http://support.microsoft.com/kb/904946
http://support.citrix.com/article/CTX117491

Regards,

Jonathan Pitre

By: Helmut Hauser (Houzer)
16 December, 2010
Other tuning options are:

1st) Turn off TCP Offloading (at the NIC AND the OS)

OS:
%SYSTEMROOT%SYSTEM32
etsh.exe int tcp set global chimney=disabled
%SYSTEMROOT%SYSTEM32
etsh.exe int tcp set global rss=disabled

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters]
“EnableRSS”=dword:00000000
“EnableTCPChimney”=dword:00000000
“EnableTCPA”=dword:00000000
“DisableTaskOffload”=dword:00000001

2nd) If dealing with APP-V 4.6 64 Bit RDS Client on W2K8R2 this one could be for you [SCCM related]:

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftSoftGrid4.5ClientConfiguration]
“RequireAuthorizationIfCached”=dword:00000000
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftSoftGrid4.5ClientNetwork]
“AllowDisconnectedOperation”=dword:00000001
“Online”=dword:00000000
“DOTimeoutMinutes”=dword:ffffff
“LimitDisconnectedOperation”=dword:00000000
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftSoftGrid4.5ClientPermissions]
“ToggleOfflineMode”=dword:00000000

3rd)

other optimizations:

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters]
“EnablePMTUBHDetect”=dword:00000001
“KeepAliveTime”=dword:00007530
“KeepAliveInterval”=dword:00001388
“TcpMaxDataRetransmissions”=dword:00000005
“EnableBcastArpReply”=dword:00000001
“DisableTaskOffload”=dword:00000001

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanServerParameters]
“TreatHostAsStableStorage”=dword:00000001

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlFileSystem]
“NtfsDisableLastAccessUpdate”=dword:00000001
“DontVerifyRandomDrivers”=dword:00000001
“NtfsDisable8dot3NameCreation”=dword:00000001

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsaKerberosParameters]
“MaxTokenSize”=dword:0000FFFF

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem]
“DelayedDesktopSwitchTimeout”=dword:00000005

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl]
ServicesPipeTimeout”=dword:0001d4c0

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesBrowserParameters]
“IsDomainMaster”=”FALSE”
“MaintainServerList”=”No”

As always – do NOT use this in a production environment.
Test it in a lab.
Be very careful when touching the autotuning TCP/IP stack. This can backfire.
Talk with the networking gents.

By: Julien Sybille (Julien.sybille)
20 December, 2010
Jonathan, I made some investigation about HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-TcpUserOverride

And, my result is that your Right about this key, it’s not applied anymore on 2008R2

So it’s meamn that also HKLMSYSTEMCurrentControlSetControlTerminal ServerWinStationsICA-TcpUserOverride is not applied any more.

Looking on the Citrix Policy we found a few settings that replace this options like the DragFullWindows options.

I will test, all the options that you post and that are not already in my tips and make an update soon.

Please, if someone found other tuning Tips for 2008R2 / XenApp 6, let us know.

Julien Sybille

By: Xavier TINON (xaviertinon@yahoo.fr)
20 December, 2010
Thank you very much for all tuning tips.

For my test, I’ve trying to use de three PowerCFG command line, because my servers will going to 100 % CPU, causing by NTDLL.DLL under the svchost without reasons.

With this three command line enter on all Win2K8 R2 servers, this error is not coming back.
For information, we are running all VM on vsphere 4.1.

Very good job,
Best regards,

Xavier TINON

By: hector lorenzo (worldphoenix)
23 January, 2011
Julien

Can you give please give us an idea of what you mean when you say you have validated these performance tweaks?

Was it done in a production environment and if so what were the actual benefits ?

What I am getting at is that just adding them to a server in a test environment doesn’t really mean much….

Thanks

Hector

By: wilson mosquera (wmosquera)
7 February, 2011
This can also be used to xenserver 5.6 ?

Regard best

Wilson

By: Julien Sybille (Julien.sybille)
7 February, 2011
To respond to your question these tweaks have been applied on a production environment 3 months ago now with XenApp 6 patchs in the same time and itâ��s running fine. the tweaks have reduces my logon time from 37 seconds to 18-20 s, reduce my CPU usage and avoid my XenApp server hangs (when’s applying citrix strategy at user logon for example). Please note that Iâ��ve applied this setting only in one particular client environment, let us know your feedback from your personal test?

Julien

By: Julien Sybille (Julien.sybille)
7 February, 2011
Wilson I will say this can be tested on xenserver 5.6 on a lab environnement. I don’t see any reason why it will not working, but I’ve never try…

Please let us now your result if you try it ?

julien

By: Xavier TINON (xaviertinon@yahoo.fr)
15 February, 2011
Hi ,

Sorry for my late reply.

I confirm that the CFG command have correcting my 100 % CPU use for all servers in test and production environment.

I ‘ have seen, that Citrix have developped a hotfix, that fix this 100 CPU by ntdll.dll on “svchost”. But I don’t have enough time for test it.

Xavier

By: Shawn Bass (Shawn Bass)
22 April, 2011
Hello Julien & Pierre!

Was reviewing this list of items a grabbing a few for a project of mine when I noticed an error in your SuppressionPolicy settings for Windows Explorer optimizations. I think the mistake is when you were entering the values in hex you left a 0 out, so instead of entering 100000 which is 1048576 in decimal you have 10000 which is 65536 in decimal.

Thanks.

Shawn

By: Shaun Ritchie (ritchies)
7 July, 2011
Why do all the Explorer tuning tips relate to Windows XP?

All the links I have followed to Microsoft.com refer only to Windows XP or Windows 2000.

By: Orhan Taskin (otaskin@gmail.com)
7 July, 2011
are there any script or tool to backup/set registry values automatically? Thanks.
By: Shaun Ritchie (ritchies)
18 July, 2011
You can use REG EXPORT at command prompt or maybe the REGISTRY cmd-let in PowerShell.

You can also use group policy preference to enforce the registry settings and tick “Remove this item when it is no longer applied”

By: Scott McKenzie (Scott McKenzie)
25 August, 2011
It is recommended to set MaxWorkItems to 4x MaxMpxCt. With MaxMpxCt set to 2048 this would mean MaxWorkItems should be 8192.

I think you might have it back to front because in your article MaxMpxCt is 4x MaxWorkItems.

Advertisements

(Old Post) XP Performance Optimizations for XenDesktop and Provisioning Server vDisks

Performance Optimizations for XenDesktop and Provisioning Server vDisks
By Paul Wilson

Older post on XP xendesktop, but some information still applies.
Introduction
Many environments have already managed to streamline the image building process and already have familiarity with the many Windows XP performance and optimization tips. Both XenDesktop (XD) and Provisioning Server (PVS) support the Windows XP operating system and can benefit from performance enhancements. For those who are familiar with these performance enhancements, this blog may provide little assistance in the way of new information. None of the optimizations below are required, but they are available here for your convenience if they make sense in your environment.

The optimizations are put into three sections: Those that apply to the current user profile, those that apply to all users on the machine, and recommendations before creating the vDisk. The first section deals with the items that can be set in the default user profile. The second section deals with settings that can be set by the administrator for all users that work on the machine. The final section recommends a few things to do before taking the vDisk image. When available, the section will provide links to the URL on Microsoft?s website that explains the setting further.

Settings for the Default User Profile
This section lists a few of the settings that will improve the user experience but are set at the user profile level.  The recommendation is to create a generic user and then set the applicable settings, when completed, replace the default user profile with the generic user profile, the steps for which are found at the end of this section.

Force Offscreen Compositing for Internet Explorer
Turning this setting off removes any of the flickering that may display when using Internet Explorer through XenDesktop, by telling Internet Explore to fully render the page prior to displaying it. This is especially helpful on Internet Explorer 7.

Open Internet Explorer
Select Tools >> Internet Options from the menu
Select the Advanced tab
In the Browsing section, enable the checkbox for ?Force offscreen compositing even under Terminal Services?
Click OK to save the changes
Restart Internet Explorer
More information available at http://support.microsoft.com/kb/271246/en-us

Remove the Menu Delay
The Start menu has a built-in delay of 400 milliseconds. To speed the menu response time, follow these steps to remove the delay:

Start the Registry Editor (Regedit.exe)
Navigate to  HKEY_CURRENT_USERControl PanelDesktop
Set the value of MenuShowDelay to 0
Exit the Registry Editor

Remove Unnecessary Visual Effects
Disabling unnecessary visual effects such as menu animations and shadow effects that generally just slow down the response time of the desktop.

Right-click My Computer
Click Properties
Click Advanced
Click the Settings button under the Performance section
Click ?Adjust for best performance?
If you want to keep the XP Visual Style, scroll to the bottom and check the last box titled ?Use visual styles on windows and buttons?

Disable the desktop cleanup wizard
To stop the wizard from automatically running every 60 days:

Right-click a blank spot on the desktop, and then click Properties to open the Display Properties dialog box
Click the Desktop tab
Click Customize desktop to open the Desktop Items dialog box
Disable the ?Run Desktop Cleanup Wizard every 60 days? setting
Click OK twice to close the dialog boxes
More information available at http://support.microsoft.com/kb/320154

Disable Automatic Searching of Network Printers and Shares
Automatic search periodically polls your network to check for new shared resources and adds relevant icons into My Network Places if anything is found. If you wish to prevent XP from regularly searching your network unnecessarily then follow these steps:

Open the Control Panel
Select Folder Options.  If you use the Control Panel Category View you?ll find Folder Options under Appearance and Themes
Click the View tab
In the Advanced Settings list, disable the ?Automatically Search for Network Folders and Printers? setting
Click OK

Disable the Windows XP Tour Notifier
If you did not turn this off before you logged in as your base user for the default profile, you can manually disable the prompt on a per-user basis by following these steps:

Start Registry Editor (Regedit.exe)
Navigate to HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionAppletsTour
On the Edit menu, point to New, click Dword Value, type RunCount
Set the data value to 0 (zero), and then click OK
Quit Registry Editor
More information available at http://support.microsoft.com/kb/311489

Turn off Automatic Updates
Since you are running a read-only image, using automatic updates will cause the operating system to continually download the same updates each time the image is booted. The best course of action is to turn it off. You have three options that can be used to disable the service:

Use the PVS Optimizer tool and leave the ?Disable automatic update service? box checked
~ or ~

In the Services Control Panel, change the Startup Type of the Automatic Updates service to ?Disabled?
~ or ~

Run GPEDIT.MSC and navigate to:  Local Computer Policy > Computer Configuration >  Administrative Templates > Windows Components >  Windows Update. Set the ?Configure Automatic Updates? setting to ?Disabled?

Turn off Language Bar
If there is no need for the language tool bar (the pen icon in the systray) you can disable it using either of these two methods.

Right-click taskbar > Toolbars and uncheck the ?Language Bar? option.
~ or ~

Navigate to Control Panel > Regional and Language Options > Languages (tab) > Details (button) > Language Bar (button at bottom). Disable the ?Show the Language bar on the desktop? and ?show additional Language bar icons in the taskbar?.

Make the User Profile the Default User Profile
When you are done completing all the User Profile Settings (using a generic user) you can copy the profile over to the default user using the process below.

Login as an administrator (Local Administrator is recommended) not as the base user for the profile because you cannot copy a profile that is in use.

Right-click on My Computer
Choose Properties
Select the Advanced tab
Click the Settings button under the ?User Profiles? section
Select your base user profile where the changes above were made and click Copy To
Click the Browse button and browse to C:Documents and SettingsDefault User
Click OK once to save the path
Click the Change button under ?Permitted to use?
Enter Everyone
Click OK to save
Click Yes to confirm overwriting of the default user profile
NOTE: Before copying it over, be sure to remove any user or machine specific data for the ICA Client, the ICA Streaming Client, Password Manager, and EdgeSight. Since the image prep for these items is beyond the scope of this blog, I will save it for a topic another day.

If you would like to know more about user profile management in general, check out David Wagner?s blog on the Citrix User Profile Manager available at http://community.citrix.com/blogs/citrite/davidwag/.
Settings for the Machine
This section provides a list of the optimizations that will affect all users of the image. These settings are usually set after logging in as an administrator.

Power Configuration Settings
Two of the power settings can adversely affect the performance of PVS. One of them is the hard disk power savings. If the PVS server is using a local hard disk for the vDisk cache, you do not want the operating system to power down the local drive. The other setting is the Hibernate setting. The PVS Optimizer tool will disable hibernating, but you can manually do it as well. Here are the steps for disabling the power settings:

Open Control Panel
Select the Power Options applet
Select the Power Schemes  tab
For the default power scheme, set ?Turn off hard disks? setting to Never
Select the Hibernate tab
Disable the ?Enable Hibernation? setting
Click OK to save the settings
Delete the c:hiberfil.sys hidden file

Permanently Remove the Language Bar
If there is no need for the language tool bar to be installed at all, you can permanently remove it by running the following command from a command-prompt:

Regsvr32.exe /u msutb.dll

To reinstall it because you later found out you should not have removed it, you can run this command:

Regsvr32.exe msutb.dll
Disable TCP Checksum Offloading
This performance optimization is highly recommended by both Citrix and Microsoft for all Windows XP workstations that will be communicating over the network with other Microsoft resources. To work around this problem, turn off TCP checksum offloading on the network adapter using these steps:

Start the Registry Editor (Regedit.exe)
Navigate to the registry key HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
In the right pane, make sure that the DisableTaskOffload registry entry exists. If this entry does not exist, follow these steps to add the entry:
On the Edit menu, point to New, and then click DWORD Value.
Type DisableTaskOffload, and then press Enter
Click DisableTaskOffload.
On the Edit menu, click Modify
Type 1 in the Value data box, and then press Enter
Exit Registry Editor
More information available at http://support.microsoft.com/kb/904946/
Turn off Security Center
To disable the Security Center service, so users are not prompted when the firewall or anti-virus updates are out-of-date, you can disable it by peforming the following steps:

Open the Services Control Panel
Edit the Security Center service properties and set the Startup Type to ?Disabled?

Disable Last Access Time Stamp
Windows XP has a habit of time stamping all the files it reads with the date and time it was last accessed. While this is a nice feature, it is not always necessary in PVS environments where the files are statically supplied from a standard image and no backup software will be used. Putting a timestamp on a recently read file creates a write access every time a read is executed. With Provisioning Server, these writes go to the vDiskCache file increasing network traffic if cached on the PVS server. To disable the last access timestamp behavior, complete the following steps:

Start a command prompt
Type FSUTIL behavior set disablelastaccess 1 and press Enter
Requires a reboot to take effect

Disable the Windows XP Tour Notifier for New Users
Windows XP likes to notify all new users that an XP tour can be taken. While this is a nice feature for new users, it typically is annoying for existing users. To suppress the XP tour prompt for all new users, follow these steps:

Start Registry Editor (Regedit.exe)
Navigate to the registry key HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionAppletsTour
If the Tour key does not exist, follow these steps to create it:
From the Edit menu choose New
Click Key and type Tour as the key name
On the Edit menu, point to New, and then click Dword Value
Type RunCount as the name for the new value
Set the data value for the RunCount value to 0 (zero), and then click OK
Quit the Registry Editor
More information available at http://support.microsoft.com/kb/311489
Turn off System Restore
System Restore is the feature that allows a computer system to be rolled back, or restored, to a point before certain events took place, for example, prior to specific software or hardware installations. When you are using a standard mode (read-only) vDisk, there is no reason to have the System Restore feature enabled. The PVS Optimizer tool disables the System Restore feature, but if you are not using that tool, you should complete the following steps:

Right-click My Computer, and then click Properties
On the Performance tab, click File System, or press Alt+F
On the Troubleshooting tab, click to select the Disable System Restore check box
Click OK twice, and then click Yes when you are prompted to restart the computer
To re-enable System Restore, follow steps 1-3, but in step 3, click to clear the Disable System Restore check box
More information available at http://support.microsoft.com/kb/264887
Disable Windows Indexing Services
Windows Indexing service adds overhead to the PVS vDisk by reading the files from the vDisk for indexing. Use one of the following three methods to disable Indexing:

Use the PVS Optimizer tool and leave the ?Disable Indexing Services? setting enabled
~ or ~

To turn off indexing at the drive level, perform these steps:
Open My Computer
Right-click on the drive on which you wish to disable the Indexing Service
Select Properties
Under the General tab, disable the ?Allow the Indexing Service to index this disk for fast file searching? setting
~ or ~

To disable the indexing service at the service level, perform these steps:
Click Start, Run, type services.msc then press Enter or click OK
Scroll to the ?Indexing Service? in the right-hand pane and double-click it
Change the Startup type to ?Manual? or ?Disable? and Apply
Click the Stop button and wait for the service to stop then click OK

Modify the Windows Service Timeout
In environments with shift changes and large amounts of virtual machines rebooting some virtual machines may fail to register because the Windows Service timeout may be reached before Citrix Desktop Service starts.  The Windows Service default timeout is 30 seconds which may not be long enough for all the services to when the virtual machines are coming online simultaneously. We recommend changing the 30-second default to 120-seconds to give the services times to start before the Citrix Desktop Service starts.   The timeout value is represented in milliseconds so 60 seconds = 60000 ms.  The following registry change can be made to lengthen the Windows Service timeout period.

Start Registry Editor (Regedit.exe)
Navigate to the registry key HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl
If the ServicesPipeTimeout value is not present, use the following steps to create it:
Click the Control subkey
On the Edit menu, point to New, and then click DWORD Value
Type ServicesPipeTimeout, and then press Enter
Right-click the ServicesPipeTimeout key and then click Modify
Click Decimal
Type 120000, and then click OK
Quit the Registry Editor
Reboot for the changes to take effect

Disable Remaining Unnecessary Services
You can go through the list of other services that are configured on Windows XP and disable any ones that will not be used in your environment. Two possible services are the Wireless Zero Configuration service and the Themes service.
Enable ClearType
To enable ClearType and make any adjustments to suit your eyes, go to the Microsoft Typography pages and follow the simple instructions. You can adjust ClearType in the Control Panel after installing the software at the link.
Recommendations Before Imaging
Below is a list of recommendations that can be completed right before creating the vDisk image. Most of these are designed to optimize the layout of the files on the disk so that PVS server can operate at maximum efficiency.
Zero Deleted Files
SDelete is a secure file delete utility that can be used to free and cleanup unused space on the image. In short, it zeroes out any files that have been freed up by the operating system and helps the image run faster. For more information about how it works or to download it, visit the URL below. The recommended options are -z and -c. (sdelete -z -c)

Usage: sdelete [-p passes] [-s] [-q] <file or directory>

sdelete [-p passes] [-z|-c] [drive letter]

More information available at http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx
Defragment the Local Disk
Run the some type of disk defragmenter tool to optimize the files on the image. It is best to run the utility after removing the pagefile.sys and hiberfil.sys files. If you will use a page file, just re-enable it after you defragment the disk, that way the page file is contiguous. The Windows Defragmenter can be found at Start >> Programs >> Accessories >> System Tools >> Disk Defragmenter.
Flush the DNS cache
Flush the DNS Cache using the ipconfig /flushdns command. This prevents any IP addresses cached on the read-only disk from interfering with DNS resolution at a later date.
Run ChkDsk
Verify the file system has no missing file links or pieces by running chkdsk –f from a command prompt.

Clone XenAPP 6.0 VM

One of the many enhancements Citrix made in XenApp v6 is that cloning a server is now much easier that it was in previous versions. Here’s a step-by-step guide, with lots of screen caps:

  1. Install the updated XenApp Server Configuration Tool.
  2. Run the XenApp Server Role Manager (Start – All Programs – Citrix – XenApp Server Role Manager – XenApp Server Role Manager):
  3. Select “Edit Configuration:”
  4. Select “Prepare this server for imaging and provisioning:”
  5. On the next screen, check “Remove this current server instance from the farm,” as shown below, then click “Next.” As the pop-up tip indicates, this will save you from having to do it manually later. The server will automatically join the farm when you bring it back on-line.
  6. On the next screen, click “Apply:”
  7. The server runs through the items that are needed to prepare XenApp for cloning. Note the informational warning that the settings will be applied when you clone or reboot the server. This means that once your new server comes on-line, it will automatically join the farm that the original server was in (before you removed it in Step 5).
  8. Back at the XenApp Server Role Manager screen, you can choose to reboot the server (which you probably don’t want to do just yet), or simply close the window and proceed with any additional tasks you may need to perform before cloning, such as Sysprep.
  9. After you’ve finished any additional tasks, you can shut the server down, and clone it to your heart’s content. When your clones come back on-line, if they have a network connection on the correct IP subnet, they will automatically join the farm. However(“gotcha” alert), if you didn’t Sysprep them, they will all try to join the farm under the same machine name – the one your original server had. So if you didn’t change the name of the server, it’s best to disconnect it from the network, change the name and IP address, reconnect to the network, join it to the AD Domain, and then reboot it so it can join the XenApp farm using the correct name.

If you’re a Citrix “old-timer,” you’ve got to agree that it doesn’t get much easier that this!