This article was written by René Vester, but the author got mixed up during a migration.
Basic tips to help virtualize Terminal Servers and Citrix Servers on ESX3
Sever Based Computing has, for a long time now, been the most used method of centralization and consolidation of applications. Bringing applications to the user without the worries of physical location has been a key aspect in centralizing the infrastructure. Seeing as VMware is often a key player in the disaster recovery procedures, it is important to have at least some virtualized Terminal or Citrix Servers. The better the performance we can pull from these servers, the more users we can get back to work during a disaster.
I have spent a while trying to find the best practice for running virtualized Terminal or Citrix Servers, and I will try to go through the things I have found. The performance improvement of the servers is not really something that can be rated, as it all depends on the individual setup of applications and load. But the suggestions I will mention here can be used together, or individually, in whatever way works best for your environment.
There are two levels in which these changes can be made: Host settings, which apply to an entire ESX host, and Virtual Machine settings, which apply to the individual virtual machine only.
Virtual Machine settings
Just a quick run through of setting the advanced settings on the Virtual Machine:
- Select the virtual machine in the VI Client’s inventory Panel, and choose Edit Settings from the right-button menu.
- Click Options and then click Advanced.
- Click the Configuration Parameters button.
- In the dialog box that is displayed, click Add Row to enter a new parameter and its value.
Here are a few options that can be of interest in the Terminal and Citrix Server environments:
Enables memory sharing for a selected virtual machine. This boolean value defaults to True. If you set it to False for a virtual machine, memory sharing is turned off. This can be a way to switch off memory sharing without modifying the host ESX.
If this is set, VMware HA will first try to fail over Virtual Machines to the host specified by this option. This is useful if you want to utilize one host as a spare failover host. It is not usually recommended, however, because VMware HA tries to utilize all available spare capacity among all hosts in the cluster. If the specified host does not have enough spare capacity, VMware HA tries to fail over the virtual machine to any other host in the cluster that has enough capacity.
This is useful in case you modify the ESX Host settings on some of your ESX Hosts and want to make sure your Terminal and Citrix Servers failover to the desired and configured host.
- Any – (default) The virtual CPUs of this virtual machine can freely share cores with other virtual CPUs of this or other virtual machines.
- None – The virtual CPUs of this virtual machine have exclusive use of a processor core whenever they are scheduled to it. The other hyperthread of the core is halted while this virtual machine is using the core.
- Internal – On a virtual machine with exactly two virtual processors, the two virtual processors are allowed to share one physical core (at the discretion of the ESX Server scheduler), but this virtual machine never shares a core with any other virtual.
This setting is defined in the .vmx file
One CPU pr. Virtual Machine
Dual-processor Virtual Machines incur more overhead; this overhead has a dramatic effect on Terminal Servers that is not seen in other types of servers.
Hyperthreading is not a guaranteed performance boost and if disabled will increase performance on terminal servers. This is a costly option however, as this will also translate virtual CPU’s directly to physical CPU’s, thereby making VMware less attractive from a price perspective (depending how you look at it). This goes for other servers as well not only terminal servers.
Some other things you should consider for your Virtual machine are:
- Use LSI Logic SCSI Controller
- Disable unused COM, LPT and USB ports within the Virtual Machine
- Disable auto-detect for CDROM
- Disable visual effects in Windows Virtual Machines
- For Citrix Presentation Servers, do not over-allocate memory
ESX Host Settings
Disable Page Sharing
Disabling Page Sharing will reduce the amount of vmkernel overhead in Terminal Server and Citrix virtual machines. On those guests, the memory changes often and the vmkernel would have to constantly generate the hash-values for the memory pages and compare them.
To disable page sharing, change the following:
Mem.ShareScanTotal = 0
Mem.ShareScanVM = 0
In order to avoid using PAE, set the Mem.AllocHighThreshold option to 4096. This will cause the vmkernel to use the memory below 4GB primarily for the VM’s, saving resources that are consumed by PAE.
Set Mem.AllocHighThreshold = 4096
To virtualize or not to virtualize
I think it’s a question which has been raised a lot of times over the last few years, and I will not pretend to know the answer. I believe that the question is best answered on an individual basis, and I have found that having the best possible tools in the toolbox gives me the best chance for success.
For this article, I have tried to summarize what I have found on specific Terminal and Citrix Server optimization in a virtual environment. These same suggestions may or may not be appropriate for other virtualized platforms.
VMware Infrastructure 3 Online Library
Robin Prudholm, Senior Systems Engineer, VMware Nordic
Daniel Euteneuer, Senior Systems Engineer, Presenting at VMWorld 2006
(Note: You must be logged in to post a comment.)
If you log in and nothing happens, delete your cookies from BrianMadden.com and try again. Sorry about that, but we had to make a one-time change to the cookie path when we migrated web servers.