Virtualizing Citrix XenApp on vSphere, part I


Today many organizations who use XenApp are still bound to x86 platforms because of legacy applications which don’t run on a x64 platform. Sometimes an application does run on a x64 platform but is not supported by the vendor on a x64 platform. By sticking to the x86 platform, modern server hardware can’t be fully utilized due to the memory limit of 4 GB of the x86 platform.

To overcome this limitation virtualization comes to practice! Virtualizing a XenApp server has always been a challenge. However with the maturity of vSphere and current CPU’s, there isn’t a limitation anymore to not virtualize a XenApp server. In this article I will share you my experience of implementing a virtualized XenApp production environment for a customers and give you my recommendations for a successful virtualization of XenApp.

This article is split in different parts. In the first part I focus on the configuration of the XenApp VM. In the second part I will look at the application landscape and the underlying ESX host and in the last part I will look at the performance results.

Building a XenApp VM

The configuration of a XenApp VM is crucial to the performance of a virtualized XenApp server and has a direct link with the hardware configuration of the underlying ESX host. As with every VM there are four main performance aspects that need to be optimized for the corresponding workload: cpu, memory, disk I/O and network I/O.

CPU
The most important resource for the XenApp VM is CPU. XenApp VM’s tend to use a lot of CPU resources and this is most likely to be the first bottleneck. In creating you XenApp VM, there are two scenario’s: scale-out or scale-up. In the scale-out scenario there a lot of light XenApp VM’s created with one vCPU. In the scale-up scenario less VM’s are created with two vCPU. The main objective is to not over commit your physical CPU’s. Let’s say you have a ESX host with two Quadcore CPU’s, which is a total of 8 cores. If you create eight 1 vCPU VM’s, each VM can schedule a dedicated CPU. The same applies for 2 vCPU VM’s, if you create four 2 vCPU VM’s, each VM can schedule a dedicated set of CPU’s.

Depending of the workload on your XenApp VM, one of this scenario’s fits best. If you have light workloads the scale-out scenario might be best, but in most situations the scale-up scenario does the best job. In most circumstances, using 2 vCPU’s allows for more users and a more consistent user experience. With the improvements made to the CPU scheduler in vSphere, like further relaxed co-scheduling, SMP XenApp VM’s are no longer a problem. If you are using a host with Intel Nehalem CPU’s enable the CPU and Memory hardware assistance (more information on this in part II).

Disk I/O
The second important resource is disk I/O. This will be further explained in the next part of this article but for now I recommend to use two virtual disks for a XenApp VM. One for the operating system and one for the applications. For optimal disk I/O performance, make sure you align the file system in the guest OS.

Memory
The next resource for the XenApp VM is memory. With memory there is one simple rule. Don´t over commit memory for your XenApp VM´s. Depending of the workload of the XenApp server, configure the XenApp VM with the corresponding amount of memory. In most situations this will be 4096 MB of RAM (assuming you are using a 32 bit OS). Make sure you also make a memory reservation of the same size. This way the XenApp VM has all the configured RAM available and the VMware balloon driver cannot degrade the performance of the XenApp VM.

Network I/O
The last resource for the XenApp VM is network. I haven´t seen any XenApp VM implementation where network i/o results in a bottleneck but for best results use the new VMXNET 3 vNIC. The VMXNET 3 has less impact on the CPU which is always useful.

Other considerations
I recommend to use Windows Server 2003 R2 x86 for building the XenApp VM. Windows Server 2008 uses a lot more resources. This probably will be a lot better with Windows Server 2008 R2 but at time of writing this article, XenApp is not certified for use with Windows Server 2008 R2. Furthermore I recommend to remove the CDRom drive and floppy disks. The floppy disk can be complete disabled in the BIOS of the VM. Always install the latest VMware Tools to provide the optimized drivers for the virtual SCSI and network devices and install the balloon driver.

So let’s summarize the preferable XenApp VM configuration:

2 vCPU
4096 MB of RAM with 4096 MB reserved
1 LSI Logic Parallel SCSI controller
2 virtual disks, one of OS and one for applications
1 VMXNET 3 vNIC
CDRom drive removed
Floppy drive removed
CPU and Memory hardware assistance enabled if using Intel Nehalim processors

Again, depending on your environment another configuration could be more desirable. A consistent server configuration is very important in a XenApp farm so I recommend to build a dedicated template for deploying XenApp VM’s.

In the next part of this article I will look at the application landscape and the underlying ESX host for building your virtualized XenApp farm.

Continue to part II.

10 Responses to Virtualizing Citrix XenApp on vSphere, part I

  1. […] Virtualizing Citrix XenApp on vSphere, part I « vKnowlegde vknowledge.wordpress.com/2009/10/26/virtualizing-citrix-xenapp-on-vsphere-part-i – view page – cached Today many organizations who use XenApp are still bound to x86 platforms because of legacy applications which don’t run on a x64 platform. Sometimes an application does run on a x64 platform but is… (Read more)Today many organizations who use XenApp are still bound to x86 platforms because of legacy applications which don’t run on a x64 platform. Sometimes an application does run on a x64 platform but is not supported by the vendor on a x64 platform. By sticking to the x86 platform, modern server hardware can’t be fully utilized due to the memory limit of 4 GB of the x86 platform. (Read less) — From the page […]

  2. Ivo Beerens says:

    For the second disk you can use PVSCSI disk driver.

  3. Shaun says:

    Nice article!
    So only major limitation is around the 4GB memory limit within x86, so whats the best way to get the most out of your Xenapp environment in this situation, since most of the time the same app is being utilised? Place more VM’s with this spec out there or utilise the memory optimisation functionality..?

  4. Shaun says:

    Sorry another question I have is – using W2k3 Enterprise could we not utilise the additional memory or is XenApp unable to use any more than the 4GB allocated by the OS?

    • Ted Steenvoorden says:

      Hi Shaun,

      You could use Windows Server 2003 Enterprise with the /PAE boot option. PAE stands for Physical Address Extension and allows the kernel to address more than 4 GB of RAM by virtualizing the address space of processes on x86 systems. There is one caveat to this, namely drivers. Drivers often access physical memory directly. Badly written drivers use only 32-bit pointers and are thus not able to count higher than to 4 GB. Plus you have to use a Windows Server 2003 Enterprise license, which makes your terminal server very expensive.

      • Mikael Laine says:

        PAE usually works just fine(i would say 90% of the time). The main downside is the kernel space memory limitations of a x86-plattform. The kernel will always see 2GB (even if you have less or more), it won’t be able to utilize more systemmemory. The kernel memory space is devided into 4 main areas (in fact it’s more but others are not that important). These areas are static (you can tweak these with the registry). If, for example, you use 16GB RAM in your machine it will require more PTE’s, ie PTE’s will use more kernel space memory so the other 3 areas will have less to work with. Getting most performance out of a 32bit system is all about tweaking the kernel space memory to suit the role of the machine (will depend on what it’s used for).

        However, when it comes to virtual machine you won’t be loading more than around 30 to maximum 40 users / machine. IE. 4GB is mostly enough. However, if you’re going to overcommit CPU or Memory, make sure to loadtest with edgesight while staying logged on to the machine to get a feeling for the real user experience. Don’t rely on numbers. Numbers are usually a bit off when it comes to virtual guests, especially if you’re sharing hardware.

  5. […] for Citrix XenApp hosted on VMware I discovered some resources I would like to share with you : Virtualizing Citrix XenApp on vSphere, part I Virtualizing Citrix XenApp on vSphere, part II Best Practices XenApp on […]

  6. Jamie Lee says:

    Have Citrix confirmed the use of win2008 R2 for Citrix XenApp as a supported install?

  7. Tabrez says:

    One hard disk for OS means OS + XenApp right and second one for Applications means published application right??? Kindly reply

    • Ted Steenvoorden says:

      Hello, Tabrez. You are complete right. I can also recommended to place the ‘document and settings’ directory and temp directories on a seperate disk. This way the system disk can never run out of free space and it gives you the option to place the the ‘document and settings’ directory and temp directories on a faster disk.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: