LiquidObject

Slow snapshots with VMware

Within vSphere one of the common features available is the ability to take snapshots. For a couple of years now taking snapshots had an option called “Snapshot the virtual machine’s memory” which would snapshot the target VM with a perfect run time state snapshot.

This feature comes at a price time. Recently I’ve been going after some of the larger servers in my environment, in this particular test case some new Exchange CAS/HUB servers. When taking a snapshot normally it would complete within 5 seconds. However, with the given VM’s running 4vCPU and 8GB ram each taking a snapshot of the VM’s memory was taking over 21 minutes on creation. The issue only shows itself during creation when merging snapshots back together there is no unusual delay.

Now there is a way to enhance the perform, however it requires manually editing the vmx config file by hand, via powercli, or via the vSphere client.

Here’s how with the vSphere client.

With the given VM powered off, edit it and select the options tab.

Select Configuration Parameters and then “Add Row” twice then insert the following:

Name: mainMem.ioBlockPages
Value: 2048

Name: mainMem.iowait
Value: 2

Then select “Ok” twice and power back on the VM to test it again.

With the same VM the second time around it took just under 2 minutes and 20 seconds, saving myself almost 20 minutes per snapshot.

As with anything please test this yourself, I would assume your mileage would vary depending upon your configuration. When looking to implement this on a large scale of dozens, hundreds, ect VM’s you would need to leverage PowerCLI. To shutdown, edit, and power back on each VM.

, , , ,
July 27, 2012 at 3:13 pm Comments (0)