Optimizing Windows XP for XenDesktop and Provisioning Server vDisks

Posted on 2008/10/24


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.

1. Open Internet Explorer
2. Select Tools>Internet>Options from the menu
3. Select the Advanced tab
4. In the Browsing section, enable the checkbox for “Force offscreen compositing even under Terminal Services”
5. Click OK to save the changes
6. Restart Internet Explorer

More information available here.

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:

1. Start the Registry Editor (Regedit.exe)
2. Navigate to HKEY_CURRENT_USER\Control Panel\Desktop\
3. Set the value of MenuShowDelay to a lower value say 100
4. 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.

1. Right-click My Computer
2. Click Properties
3. Click Advanced
4. Click the Settings button under the Performance section
5. Click “Adjust for best performance”
6. 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:

1. Right-click a blank spot on the desktop, and then click Properties to open the Display Properties dialog box
2. Click the Desktop tab
3. Click Customize desktop to open the Desktop Items dialog box
4. Disable the “Run Desktop Cleanup Wizard every 60 days” setting
5. Click OK twice to close the dialog boxes

More information available here.

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:

1. Open the Control Panel
2. Select Folder Options. If you use the Control Panel Category View you’ll find Folder Options under Appearance and Themes
3. Click the View tab
4. In the Advanced Settings list, disable the “Automatically Search for Network Folders and Printers” setting
5. 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:

1. Start Registry Editor (Regedit.exe)
2. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Tour
3. On the Edit menu, point to New, click DWORD Value, type RunCount
4. Set the data value to 0 (zero), and then click OK
5. Quit Registry Editor

More information available here.

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:

1. Use the PVS Optimizer tool and leave the “Disable automatic update service” box checked

~ or ~

2. In the Services Control Panel, change the Startup Type of the Automatic Updates service to “Disabled”

~ or ~

3. 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.

1. Right-click taskbar>Toolbars and uncheck the “Language Bar” option.

~ or ~

2. 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.

1. Right-click on My Computer
2. Choose Properties
3. Select the Advanced tab
4. Click the Settings button under the “User Profiles” section
5. Select your base user profile where the changes above were made and click “Copy To
6. Click the Browse button and browse to C:\Documents and Settings\Default User
7. Click OK once to save the path
8. Click the Change button under “Permitted to use”
9. Enter Everyone
10. Click OK to save
11. 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.

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 here.

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:

1. Open Control Panel
2. Select the Power Options applet
3. Select the Power Schemes tab
4. For the default power scheme, set “Turn off hard disks” setting to Never
5. Select the Hibernate tab
6. Disable the “Enable Hibernation” setting
7. Click OK to save the settings
8. 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:

1. Start the Registry Editor (Regedit.exe)
2. Navigate to the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
3. 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:
   a. On the Edit menu, point to New, and then click DWORD Value.
   b. Type DisableTaskOffload, and then press Enter
4. Click DisableTaskOffload.
5. On the Edit menu, click Modify
6. Type 1 in the Value data box, and then press Enter
7. Exit Registry Editor

More information available here.

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 performing the following steps:

1. Open the Services Control Panel
2. 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:

1. Start a command prompt
2. Type “FSUTIL behavior set disablelastaccess 1” and press Enter
3. 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:

1. Start Registry Editor (Regedit.exe)
2. Navigate to the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Applets\Tour
3. If the Tour key does not exist, follow these steps to create it:
   a. From the Edit menu choose New
   b. Click Key and type Tour as the key name
4. On the Edit menu, point to New, and then click DWORD Value
5. Type RunCount as the name for the new value
6. Set the data value for the RunCount value to 0 (zero), and then click OK
7. Quit the Registry Editor

More information available here.

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:

1. Right-click My Computer, and then click Properties
2. On the Performance tab, click File System, or press Alt+F
3. On the Troubleshooting tab, click to select the “Disable System Restore” check box
4. Click OK twice, and then click Yes when you are prompted to restart the computer
5. 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 here.

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:

1. Use the PVS Optimizer tool and leave the “Disable Indexing Services” setting enabled.

~ or ~

2. To turn off indexing at the drive level, perform these steps:

   a. Open My Computer
   b. Right-click on the drive on which you wish to disable the Indexing Service
   c. Select Properties
   d. Under the General tab, disable the “Allow the Indexing Service to index this disk for fast file searching” setting

~ or ~

3. To disable the indexing service at the service level, perform these steps:

   a. Click Start, Run, type services.msc then press Enter
   b. Scroll to the “Indexing Service” in the right-hand pane and double-click it
   c. Change the Startup type to “Manual” or “Disable” and save the change by clicking the Apply button
   d. 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.

1. Start Registry Editor (Regedit.exe)
2. Navigate to the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
3. If the ServicesPipeTimeout value is not present, use the following steps to create it:
   a. Click the Control subkey
   b. On the Edit menu, point to New, and then click DWORD Value
   c. Type ServicesPipeTimeout, and then press Enter
4. Right-click the ServicesPipeTimeout key and then click Modify
5. Click Decimal
6. Type 120000, and then click OK
7. Quit the Registry Editor
8. 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.

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.


I hope that some of these performance optimizations will come handy as you build and work with XenDesktop and PVS images in your environment. If you have other optimizations that you know have worked in your environment, please feel free to add them via the comment section on this blog.