Virtual Desktop Optimization

Virtual Desktop Optimization

book

Article ID: CTX221777

calendar_today

Updated On:

Resolution

Overview

At the start of any virtual desktop deployment, it is important to develop standards for desktop configurations that fulfill the use case requirements of the intended users.  The design should encompass both service level and functional requirements.  Along with user requirements, the design should include considerations for system and financial requirements. 

This Knowledge Base article is intended to help Unidesk clients and partners in the development of standard desktop configurations that will meet these requirements.  It includes the following sections:

Definition of requirements

A critical first step to defining a desktop architecture is to first define the desktop requirements in a standard way. A good way to look at requirements is to split them into Service Level Requirements and Functional Requirements.  The following charts illustrate examples of these definitions.

Service level requirements

RequirementDescriptionOptionsSelection
Availability % value99.90%
Operational RTODesktop, not DataTime value< 5 minutes
Operational RPODesktop, not Data < 1 week
DR RTODesktop, not Data N/A
DR RPODesktop, not Data N/A
PerformanceMixture of graphics intensity and processor utilizationLow/Medium/High
(High graphics intensity = High, Medium graphics intensity = at least Medium)
Low to High
Time to provision virtual desktops  1 week

Functional requirements

RequirementDescriptionOptionsSelection
Operating SystemThe OS for the virtual desktopWindows XP, Windows Vista, Windows 7, Linux (RedHat, Ubuntu)Windows XP/32 or Windows 7/32
Bidirectional audioAllows microphone input and speaker output Yes/No Yes
Phone system integrationRuns agent to display information from the phone system. Yes/No Yes
YWeb portal access Users can access a virtual desktop from a Web portal. Yes/No Yes
Printing Do users require printing capability? Yes/No Yes
USB peripheralsWill users need USB devices at their workstations? Yes/No Yes
Graphic intensityBased on the following criteria, how high is the graphical computing requirements? Low/Med/High Low to High
  • HD streaming
  Yes/No (Yes = High) Yes
  • Streaming media
  Yes/No (Yes = High) Yes
  • Media player
  Yes/No (Yes = High) Yes
  • Flash media
  Yes/No (Yes = High) Yes
  • DirectX
  Yes/No (Yes = Med) Yes
  • CAD
  Yes/No (Yes = Med) Yes
  • PowerPoint
  Yes/No (Yes = Med) Yes
Streaming media frequency How often is streaming media required? Often/Sometimes/Seldom Sometimes or Often
Processor utilization expectation  Low/Med/High (450 Mhz/90Mhz/1350 Mhz) Low to High
Client drive mappingsDo users require access to drives on their end-point device?Yes/No Yes
CD/DVD read accessDo users require read access to their local CD/DVD drive? Yes/No Yes
CD/DVD write accessDo users require write access to their local CD/DVD drive? Yes/No Yes
Multi-monitorDo users rquire more than one display monitor? Yes/No Yes
Web cameraDo users require a Web camera? Yes/No No
PersonaAre there user-specific items that must be available (see the following items)? Yes/No No
  • Client Certs
Users have a client certificate Yes/No No
  • Require unique Windows profile
Will user settings stored in their Windows profile need to persist? Yes/No No
Remote accessWill users need to access their virtual desktops from outside the production network? Yes/No Yes
Roaming accessWill users need to access their virtual desktops from multiple location in the production network? Yes/No Yes
Offline accessWill users need to access their virtual desktops while not connected to any network? Yes/No/Maybe No
Encrypted communications requirementIs an encrypted channel required from end-point to virtual desktop? Yes/No Yes
Access loggingShould users' logon attempts be logged? Yes/No Yes
Administrative access   No
Install applications   No

By defining these requirements, you can, objectively, define a desktop architecture that meets user needs.  With this information, an architect can distinguish between must have and and nice-to-have functionality that is included or excluded from the design, based on the cost and benefit to the overall architecture.

General performance considerations

A physical desktop typically has a lot of extra processor cycles that services and applications can use whenever necessary.  Microsoft also knows this -- they have designed the default Windows installation to include many services and applications that are not necessary to meet user requirements.

However, when moving any substantial segment of desktops from physical to virtual, it is very important to create a standard configuration for virtual desktops that is tuned to work well within a virtual architecture.  In a virtual desktop architecture, processor and memory configurations should be right-sized, disabling or removing unnecessary services and applications.

Most often Unidesk clients are seeking to minimize storage use, especially if the platform used for the VDI infrastructure is based on an expensive hybrid or SSD based storage solution.  If this is the case, then care must be taken with applications that affect the Personalization layer for the desktop so that the amount of storage used is minimized.

Lastly, within VDI architectures it is important to understand service and application storage IO characteristics and to make an effort to minimize IO,  especially when you are using expensive SAN storage. 

Optimization strategy for services and applications

After you define the desktop requirements, it is easier to determine which features and services that are part of the operating system to include in the design.   What are the key factors to consider when determining the costs and befits of each feature of the operating system or an application?

Considerations for VDI density

VDI density (the number of virtual desktops per server), is important to the overall Total Cost of Ownership. Conditions that can affect VDI density include:

  • Running unnecessary services and applications that use a significant amount of processing cycles, such as indexing, filtering, defragmentation, and the Windows Aero graphical user interface.
  • Running unnecessary services and applications that use a large amount of memory.
  • Running unnecessary services and applications that create a significant amount of I/O, such as antivirus system scans and defragmentation.

Effect of automatic updates on storage

When using Unidesk, services and applications that update the operating system and applications automatically are usually unloaded, set to manual, or removed because you use Unidesk to deploy updates in a centralized manner.  If automatic updates are enabled on individual desktops, the changes that automatic updates create are stored in the Personalization layer on every desktop where they run.  Storing these changes greatly increases the amount of storage used in a Unidesk environment. In addition, allowing automatic updates can create a situation where all the desktops in the environment become inoperable due to the automatic deployment of untested updates to every desktop.

Unidesk is able to save a significant amount of storage space by allowing you to install applications and base operating systems (OS) on a CachePoint virtual appliance.  The OS and application files (or layers) are then shared amongst all the desktops deployed from that CachePoint appliance.  Files created, copied, or downloaded to the virtual desktop while a user or service is logged on to the desktop are stored separately in each desktop's Personalization layer.  To make the most efficient use of your storage, it is beneficial to limit the number of files that are copied, downloaded, or cached within the desktop in this Personalization layer.

For this reason, Unidesk recommends using the Operating System layer and the Application layers to update your operating systems and applications.  Doing so means you should disable application updaters, Windows Update, and antivirus automatic updates. Instead, actively update and patch software based on the defined service level requirements as defined with the organization.

If required, you can enable any automatic update services. Keep in mind, however, that the updates that these services generate will be installed for every desktop, will use space in the Personalization layer, and will use additional storage space for the larger snapshots, along with the initial storage space requirements.

Optimizations to minimize storage growth

The main design consideration for minimizing growth is to try to limit the total amount of storage in the desktop.  When you first deploy a desktop, the amount of data in the Personalization layer is very small.  As you use the desktop, you add and remove files from this layer.

 All types of files affect the Personalization layer, including:

  • Temporary files, including file downloads and browser cache files.  Even if you download a file to a file server, most Web browsers create a temporary file first on the local disk.
  • User-installed applications.
  • Automated updates from antivirus application, the operating system, and similar types of applications.

When you delete files from NTFS, the file system marks these affected blocks as available; however, the file system driver does not always reuse the available blocks.  NTFS actually looks for available space anywhere on the disk with enough un-fragmented clusters to store files.  It also assumes the file will need to grow and looks for space for between 2 and 16 times the file size.  This behavior means that the file system will use blocks it hadn't used previously because they have room for the file and its expected growth. 

It is best to assume that whatever size you allocate for user storage will eventually be fully utilized.  Therefore it's important to determine the smallest amount of user storage that will work for the solution.

A good rule of thumb is to allocate 5 GB per desktop for user space.  If you expect an email .ost or .pst file to reside on the desktop, add that file size to the equation as extra space.  When there is pressure on the file system to use space from deleted files, it will help to limit file growth and remove unnecessary files.

Suggested optimizations

The following list of optimizations is intended to be a starting point and is not exhaustive.  Each application deployed into your VDI environment should be checked against ways to minimize storage use and growth.

  • Reduce the number of temporary files saved in Microsoft Internet Explorer to a low amount.  We use 10 MB.  This approach also applies to other Web browsers.  In Mozilla Firefox,  set the disk cache size to a low amount.  Google Chrome has no way to limit cache size at this time.  You may want to wait until there you can adjust the cache size before you use it in a VDI desktop.
  • Managing temp files can be difficult.  Consider automating disk cleanup using Microsoft's Disk Cleanup Tool. Running this tool as scheduled task can significantly reduce the amount of primary storage used and the size of Unidesk snapshots. For additional information about using the Disk Cleanup Tool with Windows XP, see the following Microsoft Knowledge Base article: 

    http://support.microsoft.com/kb/315246

    For Windows 7,  you can use the same command-line parameters, as follows:

    1. Run sageset :1 with /setup to choose what you want to delete. 
    2. Then, in the scheduled task, run sagerun:1.

    When setting up the scheduled task in Windows 7, you can randomize the start time.  Unidesk recommends a start time of 10 PM with 8 hours of randomization to spread out the disk I/O requirement for running the cleanup.  How often it runs is a question for discussion but it might beneficial to run it every might before you perform personalization layer backups.

    Optimizations for disabling automatic or prompted updates

    The following list is intended to be a starting point and is not exhaustive.  Each application deployed into your VDI environment should be checked against ways to minimize storage use and growth.

    • Adobe Reader Choose preferences\Updater\ and check Do not download or install automatic updates
    • Skype Choose Options\Advanced Settings\When a new version is available Uncheck Notify me and Automatically Download and Install
    • Flash Disable update notifications - http://kb2.adobe.com/cps/713/a7138026.html
    • Windows Media Player Disable Updates - http://support.microsoft.com/kb/278960#Disable
    • Java Update -  To disable updates open Properties\Update and uncheck Check for Update Automatically

    There are likely several other applications that update automatically in any standard desktop configuration.  Research these applications to determine how to shut off updates.  If you don't catch all of them when you initially deploy the desktops, you can add new settings by updating the OS layer at a later date.

      Optimization resources

      There are many excellent resources you can find on the Internet to help you with optimizing configurations for virtual desktops.  The most important resources that we know of include:

      Project VRC

      Project VRC composes work on VDI optimization and testing performed by Jeroen van de Kamp and Ruben Spruijt of Login Consultants and PQR, both based in the Netherlands.  This work has been published on the VRC website and it is one of the best resources for optimizing VDI builds available.  You can find Project VRC at: http://www.projectvrc.nl/

      VMware

      VMware provides a lot of great information on their website for VMware View.  See the following list of resources for optimization information for Windows 7 and Windows XP.

      Citrix

      Citrix publishes several extensive guides for optimizing VDI Operating Systems, including the following documents: