Avatar of sara2000
sara2000
 asked on

vmware with snapshot for long time

In my new place, VM admin is running  few VMs with more than a month old snapshots. Everything are running ok as far as they concern.  These are small appliances. I read VMware article and it says that not to keep more than 72 hours, but, it did  not to mention the serious issue by keeping the snapshot other than the data store space.
Can we keep the VM with snapshot for long time? if not, what will  happen other than snapshot size?
VirtualizationVMware

Avatar of undefined
Last Comment
robocat

8/22/2022 - Mon
Murali Sripada

Snapshots are for a purpose. When you keep the snapshot for longer time, the data will be written to a newly created delta file which grows in size. The con for this is the read latency increases with more number of snapshots and over time the delta size is increased and will take days to complete consolidation.

The best practice to keep it consolidated within 72 hours  once the job is completed for which the snapshot is taken. Please read the below URL which helps a lot for more info

https://pubs.vmware.com/vsphere-4-esx-vcenter/index.jsp?topic=/com.vmware.vsphere.vmadmin.doc_41/vsp_vm_guide/managing_virtual_machines/c_about_snapshots.html

Multiple snapshots are not simply a way of saving your virtual machines. With multiple snapshots, you can save many positions to accommodate many kinds of work processes.

When taking a snapshot, the state of the virtual disk at the time the snapshot is taken will be preserved. When this occurs, the guest cannot write to the vmdk file. The delta disk is an additional vmdk file to which the guest is allowed to write. The delta disk represents the difference between the current state of the virtual disk and the state that existed at the time the previous snapshot was taken. If more than one snapshot exists, delta disks can represent the difference (or delta) between each snapshot. For example, a snapshot can be taken, and then the guest could write to every single block of the virtual disk, causing the delta disk to grow as large as the entire virtual disk.

When a snapshot is deleted, the changes between snapshots and previous disk states are merged, and all the data from the delta disk that contains the information about the deleted snapshot is written to the parent disk and merges with the base disk only when you choose to do so. This can involve a large amount of disk input and output. This may reduce the virtual machine performance until consolidation is complete.

The amount of time it takes to commit or delete snapshots depends on how much data the guest operating system has written to the virtual disks since the last snapshot was taken. The required time is directly proportional to the amount of data (committed or deleted) and the amount of RAM allocated to the virtual machine.

Thanks,
Murali
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

Performance will be poor and if the datastore runs out of storage VM will stop!
ASKER CERTIFIED SOLUTION
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
sara2000

ASKER
Thank you for the reply. I would like to find out why the performance  will be poor when it runs on delta disk not in the flat disk?. My team keeps asking me how snapshots can affect performance.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Qlemo

With one snaphsot the performance might not get hurt that much, but the more snapshots the worse. With each (uncached) block access the host has to check for that particular block from most to least recent snapshot image, until the block is found.

Imagine you made 10 (cascading) snapshots 1-9 (the original image is 0). The block to read has been changed only in snapshot 1. The host has now to check snapshots 9 (most recent) to 1, where it is finally detected and the search ends.
With writes only the current snapshot needs to be checked to see whether the block has to be replaced or appended to the snapshot.
robocat

I/O latency will be higher when running snapshots because each change is written to the delta file. What were once contiguous disk blocks are now spread randomly, hurting sequential access. Esp. if using HDD instead of SSD.

We also found that running snapshots for a prolonged time increases the chances of something becoming corrupt. A corrupt snapshot will not even leave you the possibility to consolidate it correctly and is big trouble.