Unlike with a XenApp environment, setting up a virtual desktop environment is not a matter of following out-of-box instructions. In a virtual desktop environment, you have other moving parts, such as hypervisors, Provisioning Server, XenDesktop controllers, XenApp, SAN, and Web Interface to consider.
Because virtual desktops require such a high level of resources, it’s important to optimize every area of communication possible, tailored to your network environment. This will allow you to make the most of your investment while providing a better experience to users.
Search the Internet for “Optimization of Citrix products” and you’ll find optimization tips for many products, including XenApp printing, virtual memory, XenApp, XenDesktop, PVS, and Windows XP and 7. In this article, we’ll explore just a few examples of the optimization possible within a VDI environment. We’ll start with Web Interface, since all users must go through Web Interface to access either XenApp or XenDesktop, then look at some changes possible on the XenDesktop Server OS and Windows OS.
Note: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Use it at your own risk.
Optimizing Web Interface for WAN Performance
The default.ica file can be located under C:\Inetpub\wwwroot\\conf. The following changes can be made to this file for optimization:
- Enabling the persistent cache on networks with high latency. Per Citrix, “The persistent disk cache stores commonly used graphical objects such as bitmaps on the hard disk of the client device.” This will consume disk space, but it will improve performance in connections with limited bandwidth.
Under [WFClient] section of the default.ica file, set:
PersistentCacheEnabled=On
- Restrict the maximum packet size used by ICA. This feature is usually only modified on high latency networks. Network testing should be done before and after every change to find the best packet size within your specific organization. The default maximum packet size used by ICA over the network is 1,460 bytes. Set packet size at half the maximum and test. Some networks, like wireless, will work best at 512.
Under [WFClient] section of the default.ica file, set:
OutBufLength=512
- Enable Maximum Data Compression.
In the [Application] section of the default.ica file, add:
MaximumCompression=On
- Enable SpeedScreen Latency Reduction (SLR) features on the Web Interface; this feature must also be configured on a per-server basis (see CTX344154). SLR provides users with a smooth typing experience on a network with high latency traffic between the Citrix server and the client.
In the [Application] section of the default.ica file, add:
ZLKeyboardMode=1
ZLMouseMode=1
Tuning XenDesktop Server OS
The following settings can be applied with high latency networks.
- Determine how often TCP sends keep-alive transmissions. This will help manage session drops within slow networks.
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\parameters
Reg_Dword = 60000 (60 seconds is the default)
- Determine how often TCP repeats keep-alive transmissions when no response is received.
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\parameters
Reg_Dword = 100
The following settings are recommended when using a Standard Mode PVS image. Standard Mode images are restored to the original state at each reboot. Because of this, a few settings are no longer efficient.
- Disable System Restore
[HKLM\Software\Policies\Microsoft\Windows NT\SystemRestore]
Create the DWORD value “DisableSR” if not present and set the value to 1.
- Disable Hibernation
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Power
Change both HiberFileSizePercent and HibernateEnabled value data to zero.
- Disable Memory Dumps
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl
Set “CrashDumpEnabled”=dword to 00000000
Set “LogEvent”=dword to 00000000
Set “SendAlert”=dword to 00000000
XenDesktop Tuning
The following change has been around for a while, but it’s still one of my favorites to apply to a stable environment. Out of the box, XenApp and XenDesktop will log all print events. Best practice for printing in a Citrix environment is to limit the print drivers installed on the servers, but any time a Citrix session tries to map a printer and the driver is not installed on the box, an Event ID 1106 message is generated to the Event Viewer. This can fill up the Event Viewer logs, taking away from other possible entries. Note that this event entry is still useful when troubleshooting printer mapping failure, and it can always be turned back on. To disable the log entry (CTX488760):
Disable Logging of Print Events
HKLM\Software\Citrix\Print
Value = DefaultPrnFlags
Type = REG_DWORD
Data = 1342177728
Many products can be optimized within a virtual infrastructure; however, optimization should not be taken lightly, because performance degradation can occur if the settings are not configured properly. First, a study of the environment should be performed to determine where optimization would make the most improvement. Second, all changes should be tested thoroughly before they are implemented farm-wide. A comparison should be made before and after to make sure the outcome matches expectations. Gotham consultants have implemented optimization settings, according to best practice, across many different network and virtual environments. We’re well-positioned to assist with optimizing your environment while avoiding pitfalls.
Following are some of the references used in creating this article. Here you’ll find further information and many more settings for optimization.