Write cache in vdi


Can anyone define to me use of write cache in vdi environment.please explain in simple terms,it's importance in vdi..need for right allocation.
Also what's best practice of allocating it should I keep it in SAN or within the server hardware hosting vms via an SSD
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Ayman BakrConnect With a Mentor Senior ConsultantCommented:
How are these applications presented? Installed apps have more write cache implications than hosted apps, which in turn have more implications than streamed apps. This is one consideration.

Another consideration is what type of tasks your users are carrying out? Repetitive tasks usually require less cache size than knowledge workers who carry out more sophisticated tasks.

Now what are the implications of choosing the location of write cache one over the other?

On server disk -> Benefits: you can have large cache sizes and allows for diskless target devices. Considerations: network utilization is very high since write requests traverse the network to the PVS server.

On device disk (usually on SAN) -> Benefits: network utilization is reduced resulting in good performance since fewer requests are sent to PVS server. Considerations: if the write-cache size is not appropriately allocated and the limit is reached the device will fail.

On device RAM -> Benefits: best performance and the fastest access. Considerations: Unless you have sufficient RAM, usually RAM cannot hold significant amount of data and if  limit is reached errors might be experienced and eventually the device might fail.

Bottom-line there is no right answer. It all depends on your environment and usage.
Ayman BakrConnect With a Mentor Senior ConsultantCommented:
When you work on a normal desktop IO operations are performed on the hard disk. This means the operating system needs to make read and write operations to the hard disk. VDI, or virtual desktops are no different. They need to read and write to 'hard disk' for normal operations. These operations include the following:

1. Operating System will need to write to the 'hard disk' for page files and events
2. Applications need to write application specific files (as well as read and access system files).
3. User work flow will impact the writing process. The more apps being used the more writes are done to the hard disk.

But, since the most common implementation of a Virtual desktop is a read-only image, you need a way to have the above points fulfilled. This is where the write cache comes into picture.

The design of the write cache is critical to the performance of your vDI implementation. Sizing it and deciding where it should be stored is not something straight forward. You need to understand the impact of the above three points on the size of your write cache as well as the IOPS implications.
amichaellConnect With a Mentor Commented:
The write cache is where all writes are directed in a read only VDI environment.  Write cache is a term typically used with Provisioning Services whereas Machine Creation Services uses a difference disk.  With MCS the diff disk is a delta file that grows as writes occur if the diff disk is located on storage capable of thin provisioning (e.g. NFS).  When the VM is rebooted a new diff disk is created and the old is removed.  With MCS the diff disk will always reside on disk, so it is important to ensure that your storage has the necessary IOPS to handle the load.

The delta file with PVS, the write cache, works a bit better.  It will always be thinly provisioned regardless of the location and storage.  It also resets when the VM is rebooted.  A nice option with the write cache is the ability to place the write cache in RAM of the VM instead of disk thereby eliminating write IOPS.

If you place the delta file on disk and desire live motion you'll want that disk to be on SAN.  If live motion isn't important than local SSD on the hypervisors is fine.
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

Sukku13Author Commented:
If I am using citrix pvs and if many of users open atleast 5 to 10 applications at a time ..mixture f web and other apps..is it better to give write cache on SAN or to place it in RAM of VM
amichaellConnect With a Mentor Commented:
Both work well.  RAM gives you the best performance as RAM is faster than disk, including SSD.  Though RAM is typically in short supply.  

If go with disk you need to ensure the SAN has the IOPS to handle the load.  PVS is writes heavy (usually 10/90 to 20/80 ratio of read/write), so your disk has to be able to handle all of those write IOPS.  If you are using XenApp you are probably looking at 6 - 10 IOPS per user.  If XenDesktop the load could be anywhere from 10 - 30 IOPS per user.
Sukku13Author Commented:
Most of my apps are ie based..the amount of published or streamed apps will be less..only one third users might have xendesktop plus xenapp model..rest all just xendesktop.

Can I do mix and match..certain set users have write cache in vm ram and rest in San.

Users like executive mgmt may use few apps..like ms office..PowerPoint and couple of web apps and would it be good to have them on vm ram write cache.these guys will have one or two apps streamed or published via xenapp like ms project and visio
Ayman BakrConnect With a Mentor Senior ConsultantCommented:
On one image, vDisk, you cannot do a mix and match. But, you can have more than one vDisk (i.e. image) and configure each with the desired write-cache.

I would suggest to start simple and have only one vDisk, since most your apps are web-based and if this serves your purpose. so go for cache on Target device basing it on SAN.

In parallel, create another device collection in PVS with a few target devices corresponding to XD VMs and associate it with a new vDisk set to cache to RAM. Have a sample of pilot users representative of all your users assigned to these test VMs and observe the implications consequences. If RAM deems to be sufficient in your environment and results are promising you can then shift production to cache on RAM.

P.S.: if you have a PVS test environment, then carry out the testing in it and forget about creating a device collection and what I described above.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.