• View Communities
    • Citrix Developer Network
      The place for unfiltered straight talk on Citrix products. Blogs, code downloads, best practices, APIs, and more can all be found here.
    • Citrix Ready Community Verified
      Does it work with Citrix? Application compatibility questions are a thing of the past with the new Citrix Community Verified site.
    • Blogs
      Learn the latest from the Citrix employees who are building application delivery infrastructure technologies.
    • Blogosphere
      The Citrix Blogosphere is a window into the thousands of conversations taking place about Citrix and Application Delivery.
  •  Sign In
The Citrix Blog
Personal Blog
Paul Wilson
Related Tags
posted by Paul Wilson

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.

  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 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:

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

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

  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, 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:

  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:
    1. On the Edit menu, point to New, and then click DWORD Value.
    2. 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 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:

  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:
    1. From the Edit menu choose New
    2. 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 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:

  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 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:
  1. Open My Computer
  2. Right-click on the drive on which you wish to disable the Indexing Service
  3. Select Properties
  4. 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:
  1. Click Start, Run, type services.msc then press Enter or click OK
  2. Scroll to the "Indexing Service" in the right-hand pane and double-click it
  3. Change the Startup type to "Manual" or "Disable" and Apply
  4. 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:
    1. Click the Control subkey
    2. On the Edit menu, point to New, and then click DWORD Value
    3. 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.

 

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.

 

Conclusion

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.

Labels

xendesktop xendesktop Delete
xd xd Delete
pvs pvs Delete
vdisk vdisk Delete
xendesktop xendesktop Delete
provisioning server provisioning_server Delete
windows xp windows_xp Delete
lang-eng lang-eng Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Nov 03, 2008

    Douglas Rodriguez says:

    This is a very usefull document to anyone working with XenDesktop, and i would l...

    This is a very usefull document to anyone working with XenDesktop, and i would like to add the following:

    Disable Windows Sound Scheme

    On a XenDesktop environment in order to improve performance and not to transmit any sound related traffic down to end point devices disable sound scheme by going to Control Panel>>Sounds and Audio Devices>>Sounds Tab>>Sound scheme>>No sounds.

    RADE Cleanup (Citrix XenApp Plugin for Streamed Apps)

    Before you make the User Profile the Default User Profile and after you are done completing all the User Profile Settings if you installed Citrix XenApp Plugin for Streamed Apps run the following commands one at the time from a command line windows:

    net stop radesvc

    net start radesvc

    c:\program files\citrix\streaming client\radecache /flushall

    reg delete HKLM\Software\Citrix\Rade

     


  2. Jan 31, 2009

    Anonymous says:

    Also may I suggest clearing the internet history, the recent documents, and rece...

    Also may I suggest clearing the internet history, the recent documents, and recent programs from the start menu right before you log out to copy the profile to default. You don't want all the stuff you have been downloading and running showing up for everyone.

  3. Mar 12, 2009

    Anonymous says:

    It is a great document, and it is having important and relevant information. I w...

    It is a great document, and it is having important and relevant information. I will also recommend, beside what the person above me has said, to download and install Windows Optimizers such as jv16 PowerTools 2009 (Macecraft). In this way your computer will run smoother, faster and error free.

  4. May 27

    Anonymous says:

    A couple of things. I don't agree with copying the administrator's profile to a...

    A couple of things.

    I don't agree with copying the administrator's profile to a default.  Leave the default user alone and let the application setup the account properly.  You don't do this with a Hard PC so why a virtual one?  Use scripts and GPOs to deliver a first time setup.  It's a lazy was out and I wouldn't even do this on a Terminal Server/XenApp deployment.  Spend the time to do it right.

    Same goes with disabling Windows Animation.... I used to tweak the Menu Delays (default is 400 ms to 0 ms) and got a lot of push back from customers that it was too fast.  If you are going to deliver a "RICH" OS then why disable all of the animations, etc??  If it's that big a deal then why are you delivering a XenDesktop instead of a XenApp Desktop?  It's all about the end user experience.

    Second, I don't agree with deleting the RADE cache.  I prefer to have the Virtual Apps pre-streamed.  Yes, it's more work for the admin but it's less of an impact.  With a Standard PVS image are you going to stream the app everytime a user logs in and launches the app?  Think about the delays involved, the write cache, etc..

    Also, pre-compile your .net assemblies or at least disable the .net optimization service. 

    Joe Shonk

    1. Anonymous replies:

      You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account. You can also Sign Up for a new account.

    1. Jun 05

      Paul Wilson says:

      Sorry for the delayed response, I was on haitus for 4-months. You have lots...

      Sorry for the delayed response, I was on haitus for 4-months. You have lots of comments in there, so let me run through my responses.

      I concur with the idea of not copying the admin profile to the default. I guess I should have written it a bit clearer so there was no misunderstanding around the steps. Here are the steps with emphasis to clarify.

      1.  "When you are done completing all the User Profile Settings (using a generic user) you can copy the profile over to the default user."

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

      The Windows animation tweaking is certainly optional and I think the correct setting has a lot to do with the line speed of the user and what they expect. Certainly these are recommendations and are not required.

      As far as the RADE cache, we normally recommend that you pre-cache the applications that will be streamed to the XenDesktop, so that the user does not need to wait for an application to download each time the desktop reboots.

      I like the idea of pre-compiling the .NET assemblies.





  5. May 28

    Anonymous says:

    Read the last part again: SDelete? Defrag? FlushDNS? Building a vDisk image ...

    Read the last part again:

    SDelete?

    Defrag?

    FlushDNS?

    Building a vDisk image is not like using ghost.  It's a file level copy between block-level disks.  SDelete and Defrag will not improve a vDisk image build.

    The FlushDNS thing is a little mind boggling?  Why would cached items end up in the vDisk image?  The DNS Cache is not stored on disk but in memory.

     Joe Shonk

    1. Jun 08

      Paul Wilson says:

      Sorry for the delayed response, this time I was waiting on the development team ...

      Sorry for the delayed response, this time I was waiting on the development team for Provisioning Server to respond to my questions around defragmenting before creating vDisk images.

      You are correct that the image build process is a file-level copy so running Defrag will provide little benefit to the image build process (past a slight faster file copy) and SDelete would provide no benefit as previously deleted files are not copied to the disk image. Thanks for keeping me honest.

      As for the FlushDNS entry, that was added because at one customer site the images were coming up on a fresh boot with incorrect DNS entries for the XenDesktop DDC server, that had been somehow cached in the vDisk build. Once we flushed the DNS cache and rebuilt the vDisk the issue went away. I am not sure where these were cached, and I agree they should not have been. It could have been some third-party software that was causing the issue. I did not research it further. I suppose you can skip this step as well.

  6. Jun 01

    Pierre Marmignon says:

    Follow Up : http://www.community.citrix.com/blogs/citrite/gusp/2009/06/01/XenDes...

    Follow Up : http://www.community.citrix.com/blogs/citrite/gusp/2009/06/01/XenDesktop+Tuning+Tips

    Please do not hesitate to give your feedback for this article to be enhanced.

    Best Regards,

    Pierre Marmignon

Add Comment