XD - Top 10 Mistakes Identified When Doing Desktop Virtualization
XD - Top 10 Mistakes Identified When Doing Desktop Virtualization
www.citrix.com
Contents
Contents .............................................................................................................................................................. 2 Overview ............................................................................................................................................................. 3 10. Not Calculating Network Impact.............................................................................................................. 3 9. No Profile Strategy ........................................................................................................................................ 4 8. Lack of Application Virtualization Strategy ............................................................................................... 5 7. Improper Resource Allocation .................................................................................................................... 7 6. Not Optimizing Antivirus ............................................................................................................................ 8 5. Not Managing Boot Storms ......................................................................................................................... 9 4. Ignoring Virtual Desktops Optimizations ................................................................................................. 9 3. Not Enough Cache......................................................................................................................................10 2. Default Controller Configuration..............................................................................................................11 1. Improper Storage Design ...........................................................................................................................13 Honorable Mention .........................................................................................................................................16 Revision History ...............................................................................................................................................17
Page 2
Overview
With the excitement and promise of desktop virtualization, many organizations are trying to quickly implement a VDI-type solution to realize the expected benefits. Unfortunately, this exuberance has resulted in some implementation issues due to improper planning and design. This white paper focuses on the top 10 mistakes made, identified by Citrix Consulting, when implementing a desktop virtualization solution.
Estimating network impact is not a trivial matter because the ICA/HDX protocol tunes itself based on the amount of bandwidth available. The less bandwidth available means more compression is applied. Also, any estimate must include percentages for different user activities: typing, graphics, Internet, video (Flash, WMV, etc), and printing. With this information, the following can be used to create an ESTIMATE:
Page 3
Parameter (medium workloads) Office Internet Printing Flash Video Standard WMV Video High Definition WMV Video Idle
XenDesktop Bandwidth 43 kbps 85 kbps 553-593 kbps 174 kbps 464 kbps 1812 kbps Minimal
XenDesktop with Branch Repeater 31 kbps 38 kbps 155-180 kbps 128 kbps 148 kbps 206 kbps Minimal
By calculating the percentage of time a user is expected to be doing certain activities, a rough estimate can be determined for ICA bandwidth requirements. If multiple users are expected to be accessing the same type of content (videos, web pages, documents, etc), integrating the Branch Repeater into the architecture can drastically reduce the amount of bandwidth consumed. However, the amount of benefit is based on the level of repetition between users. Additional details on the bandwidth estimates can be gathered by referring to the following Citrix white paper: CTX124457 - Performance Assessment and Bandwidth Analysis for Delivering XenDesktop to Branch Offices.
9. No Profile Strategy
The users profile is one of the major ways the pooled virtual desktop becomes personalized. If users are going to accept a new desktop strategy, they must have the ability to personalize their desktop environment. The personalization must not negatively impact the performance of the environment. When organizations do not properly plan the profile strategy, one or more of the following will likely happen: Slow logon/logoff performance Inconsistent results Lost settings
These challenges will result in a negative perspective of the entire solution. As an example:
An organization had a profile strategy in place. Users started working in the new system. One day, a user had a profile corruption issue which resulted in the deletion of their entire profile. This meant the user had to recreate their entire personalized environment. After the profile was deleted, the user also quickly noticed all of their documents were deleted. Upon closer inspection, the user stored their documents in the My Documents folder. When the profile was deleted, the My Documents folder was also deleted.
Another example:
Page 4
An organization was running a hosted VM-based VDI solution for a few months and decided the profile solution required modifications. Upon the updates, every user lost all of their personalization configurations.
To overcome these potential challenges, a profile strategy must be put into place that includes items like: Folder Redirection: Have portions of the profile stored on a network drive outside of the roaming profile. This allows the profile to load faster and protects these items from profile deletion. Group Policies: Utilize group policies to configure the users virtual desktop profile. These policies should only be used when the user logs onto a virtual desktop. Persistence: Utilize a profile solution that allows for the extraction and storage of the personalized components of a users environment outside of the profile.
Additional profile strategy recommendations can be found in the following the following article: CTX124799 User Profiles for XenApp and XenDesktop
with them. The user experience could have been improved by removing the non-standard applications from the desktop image and delivering via application virtualization. In another example, an organization tried to over design a virtual desktop solution by doing the following: A small organization consisting of 200 users implemented a virtual desktop solution. Following the complete virtualization guidelines, the organization virtualized all of the applications via hosting and streaming technologies. Although the solution functioned for the users and integrated seamlessly, trying to maintain the different components became a struggle. As the organization only had 4 different application sets, it would have been easier to implement 4 desktop images instead of a complete application virtualization solution. A proper application virtualization strategy must determine 1. If the number of desktop images is too great to manage effectively. As the number of images increase, the environment becomes more difficult to maintain. By virtualizing the applications, the number of images can be reduced significantly. If, on the other hand, only a few images are required, the time and effort to support an application virtualization solution outweighs the benefit. 2. If traditional (non-virtualized) desktops are still required within the organization. If the applications are virtualized, the traditional desktop management is simplified as these devices can utilize the virtualized applications. 3. If hosted applications are required or if all applications can be streamed to the desktop. By removing the hosted application component, the application virtualization aspect of the environment is simplified as fewer resources are required. In many implementations, application virtualization is a necessity. Integrating those applications into the virtual desktop must also be done correctly. As a general recommendation, applications should be integrated into a virtual desktop as follows:
Base Description Core applications required by all users Anomalous Unique custombuilt Uncertified Terminal Services support Resource Intensive Heavy system resource consumption Technically Challenging Large, complex with many moving parts and dependencies Frequent updates Epic, Cerner, SAP Installed on XenApp server
Page 6
Command Tuning
VMware ESX
Memory Ballooning
VMware ESX
Transparent Page Sharing allows the ESX hypervisor to share portions of memory that are identical between virtual machines. This has the potential to improve the virtual desktop performance by having a positive impact on memory consumption, although no 3rd party tests have been able to recognize any noticeable benefit. It should also be noted that transparent page sharing does take CPU cycles to compare memory blocks. Memory ballooning shifts RAM dynamically from idle virtual machines to active workloads. Memory ballooning artificially induces memory pressure within idle virtual machines, forcing them to use their own paging areas and release memory for active virtual machines. In practical applications, this has shown to be an impediment to positive user experiences. Forcing virtual Page 7
desktops to page to disk requires additional processes. If a large group of idle virtual desktops become active (after lunch, for example), those items must be retrieved from disk, which takes time. And if the server is hosting many active desktops, there is a strong possibility that the server will run out of RAM, which forces the hypervisor to page more memory out to disk. It is advisable to disable this feature.
Page 8
e. Remove the antivirus configurations from the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows \Current Version\Run registry key 3. Reconfigure antivirus so that the virus definitions file is stored on a persistent disk so antivirus doesnt have to download the entire definition file on each startup.
This setting should be made to all XenDesktop controllers in the event the master fails and a backup takes over.
Page 9
Disable Last Access Timestamp: Each time a file is accessed within an operating system, a time stamp is updated to identify when that file was last accessed. Booting up an operating system accesses hundreds and thousands of files, all of which must be updated. Each action requires disk and CPU time that would be better used for user-related tasks. Also, if Provisioning services is used to deliver the desktop image, those changes are removed when the desktop is rebooted. Disable Screen Saver: Utilizing a graphical screen saver consumes precious memory and CPU cycles when the user is not even using the desktop. Those processes should be freed and used by other users. If screen savers are required for security purposes, then simply blanking the screen should be invoked as this does not impact the memory and CPU consumption. Disable Unneeded Features: Windows 7 contains many valuable components like Media Center, Windows DVD Maker, Tablet PC Components, and Games. These applications are memory, CPU and graphics intensive and are often not required in most organizations. If these components are made available to users, they will be used. It is advisable to remove unneeded services before deploying the first images.
These are only a few recommendations, but it is obvious that optimizations have a major impact on the virtual desktop environment.
Note: The virtual desktop optimization best practices for Windows XP is located in CTX124239
RAM
vDisk Storage
Optimizations
The vDisk can be stored on just about any type of storage (iSCSI, Fiber, local, NFS, CIFS, etc). However, there are a few instances where the storage selected will have an impact on how the Provisioning services servers operating system caches the vDisk blocks. 1. Network Drive: If the Provisioning services server sees the vDisk drive as a network drive via a UNC path, the server will not cache the file. 2. CIFS Share: If the storage infrastructure is a network CIFS share, Provisioning services will not cache the vDisk in memory. In Windows Server 2003, large system cache must be enabled by configuring the servers performance options, which is shown in the figure to the right. In Windows Server 2008, this setting is not required due to the enhancements in the memory allocation system. Windows 2008 utilizes a dynamic kernel memory assignment that reallocates portions of memory on-the-fly, while previous versions had these values hard set during startup. As Windows 2008 requires more system cache, the operating system will dynamically allocate.
When XenDesktop is installed, many architects fail to optimize the controller and simply install with default configurations (farm master, XML broker, Web Interface). This configuration is perfectly reasonable. XenDesktop can function with a single controller. However, during boot and logon storms, where hundreds or thousands of users connect to the environment in a short amount of time, the controller can become a bottleneck. The controller bottleneck can result in long logon times or even denied service. By separating controller functionality across multiple servers, the overall XenDesktop farm can support more virtual desktops and respond faster. First, all XenDesktop implementations should have redundant controllers to provide fault tolerance. For environments that are expected to host more than 1,000 hosted VM-based VDI desktops, it is often recommended to separate the controller functionality across a minimum of five servers all of which can be virtualized. The role designation across the five servers would be as follows:
Page 11
Description The master controller is in charge of the overall XenDesktop farm operations. It also maintains the correct number of idle desktops within the workstation groups by communicating with the virtualization layer (XenServer, Hyper-V or ESX). If the Master fails, a secondary, dedicate server can be used. If one is not defined, one of the XML brokers will be used.
Values Specify the XML controllers as backup controllers by modifying the registry: Key: HKLM\Software\Citrix\IMA\RUNTIME\ UseRegistrySetting Type: Dword Value: 1 Key: HKLM\Software\Citrix\IMA\RUNTIME\ MasterRanking Type: Dword Value: 1 To disallow the Master controller from accepting virtual desktop registrations, modify the following registry key: Key: HKLM\Software\Citrix\DesktopServer\ MaxWorkers Type: Dword Value: 0 Configure Web Interface to use the XML Controllers as the farm servers. This will only use these two servers for authentication and enumeration activities. Specify the XML controllers as backup controllers by modifying the registry: Key: HKLM\Software\Citrix\IMA\RUNTIME\ MasterRanking Type: Dword Value: 2 Key: HKLM\Software\Citrix\IMA\RUNTIME\ UseRegistrySetting Type: Dword Value: 1 Configure Web Interface on redundant servers t offload the processes from the Master and XML Controllers.
The XML controllers are responsible for registering virtual desktops, authentication and enumerating users.
The Web Interface servers provide the end user interface for authentication and desktop access.
By separating out the controller roles into three roles across five or more virtual servers, a XenDesktop farm is able to host 5,000+ hosted VM-based VDI desktops. Of course the maximum number for any implementation is based on numerous factors like logon rates, acceptable logon time, and hardware.
Page 12
Read/Write
RAID Level
Desktop Lifecycle
Taking the six different parameters into account, an architect can calculate the IOPS requirements on a server-by-server basis and for the entire desktop virtualization architecture. The formula is as follows:
For example, if there are eight 72GB 15K SCSI3 drives in a RAID 10 configuration, the storage would have 720 functional IOPS.
Page 13
( (
With the functional IOPS calculated for the disk subsystem, the number of desktops that can be supported is based on the phase of the desktop lifecycle. Identifying how many desktops can be simultaneously logged in with this configuration is as follows:
These calculations help identify what is possible when all desktops are doing the same activity. However, this is not likely to be the case. In fact, on each hypervisor, a portion of the desktops will be in one of the five phases. To determine the storage requirements, one must calculate the peak IOPS load during a logon storm or boot storm. In addition to IOPS requirements,
Parameter Write Cache RAID Write Cache IOPS Recommendation RAID 1 or RAID 10 Plan for 14 IOPS Values The write cache is write intensive, which eliminates RAID 5 as an option. Using 14 IOPS as the scalability calculation or IOPS allows for intense logon storms, which cannot be controlled. Although boot storms have a larger IOPS impact, the storm can be managed with the XenDesktop configuration. The vDisk will only experience reads. By optimizing the RAID configuration for reads (RAID 5), the speed of vDisk block delivery is increased. Fixed disks overcome the performance challenges of dynamic disks, such as: Fragmentation as disks continue to expand Simultaneous expansion of hundreds of disks during virtual desktop startup Misalignment of the storage, which results in each I/O operation within the disk requiring two I/O operations on the storage infrastructure as the blocks within the dynamic disk cross block boundaries on the storage infrastructure.
vDisk RAID
RAID 5
Disk Type
Fixed
Page 14
Page 15
Honorable Mention
In addition to the Top 10 mistakes made, the following list includes a few other items that, while important, did not make it into the top. 1. NIC Teaming: Provisioning services streams the desktop image to the virtual desktop. Provisioning services NICs should be teamed for throughput/aggregation and not just for failover/redundancy. More than two NICs can be teamed for aggregation based on network throughput requirements. 2. NIC Optimization: although Provisioning services can run with the default NIC configurations, the environment can run faster with a few optimizations: Disable Large Send Offload 3. Common Image: Reducing the number of images helps simplify management and updates as fewer image updates are required. However, using a single image across multiple physical end point platforms can become difficult to maintain. Specific hardware drivers can potentially conflict and installing multiple device drivers results in image bloat. It is often better to create different images for different hardware (not applicable if the end point is virtualized). 4. VDI for Wrong Reason: Organizations should do virtual desktops because there is a business reason to provide users with a Windows XP/Windows 7 desktop interface. Without a business reason, the virtual desktop solution will be seen as extravagant and costing too much money for no value.
Page 16
Revision History
Revision 1.0 Change Description Document created Updated By Daniel Feller Lead Architect Doug Demskis Sr. Architect Tarkan Kooglu Sr. Architect Nicholas Rintalan Architect Daniel Feller Lead Architect Date July 1, 2010
1.1
About Citrix Citrix Systems, Inc. (NASDAQ:CTXS) is the leading provider of virtualization, networking and software as a service technologies for more than 230,000 organizations worldwide. Its Citrix Delivery Center, Citrix Cloud Center (C3) and Citrix Online Services product families radically simplify computing for millions of users, delivering applications as an on-demand service to any user, in any location on any device. Citrix customers include the worlds largest Internet companies, 99 percent of Fortune Global 500 enterprises, and hundreds of thousands of small businesses and prosumers worldwide. Citrix partners with over 10,000 companies worldwide in more than 100 countries. Founded in 1989, annual revenue in 2008 was $1.6 billion.
2010 Citrix Systems, Inc. All rights reserved. Citrix, Access Gateway, Branch Repeater, Citrix Repeater, HDX, XenServer, XenApp, XenDesktop and Citrix Delivery Center are trademarks of Citrix Systems, Inc. and/or one or more of its subsidiaries, and may be registered in the United States Patent and Trademark Office and in other countries. All other trademarks and registered trademarks are property of their respective owners.
Page 17