Running Virtual Desktops from a RAM Drive
Added on: 10.28.13, by Sean Trifero
Delivery of IOPS has been a hurdle in running virtual desktops since their advent. There have been many creative ways invented to overcome this obstacle – storage companies have been born around this, acceleration appliances, many whitepapers written about host storage options, etc. At Envision, we strive to make every single virtual desktop we deploy a non-persistent desktop with all aspects of user personality abstracted. Once we abstract the user’s profile to non-volatile storage, and use a non-persistent desktop, we can have that desktop run completely out of RAM. If you’re interested in seeing what your performance would be like with minimal capital expenditure (perhaps more RAM in the host), you can easily accomplish this by running a simple Linux VM on your host as a RAM drive with an NFS export.
First, create an Ubuntu VM and allocated 40GB of RAM to it:
Login in as root and install the NFS server:
apt-get install nfs-kernel-server
Create a mount point for the RAM-based file system that you are about to create and give it full read/write permissions:
mkdir -m 777 /ramfs
Create an export for your NFS server, with similar permissions:
mkdir -p /exports/ramfs
chmod 777 /exports
Now mount the filesystem to RAM (32GB) and bind it to the export:
mount –t tmpfs -o size=32G tmpfs /ramfs
mount --bind /ramfs /exports/ramfs
From here you have to configure the NFS export permissions by adding the following line to /etc/exports:
Lastly clean up the NFS tree and start/restart your NFS service:
service nfs-kernel-server restart
From there simply add the NFS storage to your host and provision a new pool targeting that NFS datastore.
In a side by side compariso,n you’ll see the vast performance difference between a three-drive RAID5 SAS set and the RAM drive you just created.
Products like Atlantis ILIO Diskless VDI leverage this same technology, but have the added benefit of deduplication, compression, and the ability to "rehydrate" the lost virtual desktops after a reboot. On top of that, they also offer central management and top notch support for their full array of products.