How to calculate current snapshot size, estimate consolidation times, and understand performance factors affecting the consolidation process
search cancel

How to calculate current snapshot size, estimate consolidation times, and understand performance factors affecting the consolidation process

book

Article ID: 316414

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

The “Needs Consolidation” warning appears in the VM’s Summary tab when the snapshot hierarchy is inconsistent or residual snapshot files are left behind. This typically occurs when a snapshot process does not properly merge changes back into the base disk. 

Snapshot consolidation is typically needed in these cases:

Backup Tools or External Snapshot Operations:

  • Tools like Commvault, Veeam, etc often create and remove snapshots automatically
  • If removal fails due to issues such as network loss, lock timeouts, etc

Snapshot Deletion Failure. A snapshot is requested to be deleted, but the merge process fails due to:

  • File locks
  • Host crash
  • Power interruption

Long Snapshot Chains or Orphaned Files:

  • Multiple snapshots chained
  • Temporary delta files not merged

Before performing consolidation, ensure that all snapshots are deleted. Snapshot deletion merges delta changes with the base VMDK. However, if files remain or consolidation fails, manual intervention may be required.

Environment

VMware vSphere 6.x
VMware vSphere 7.x
VMware vSphere 8.x
VMware vSphere 9.x

Cause

Snapshot consolidation involves merging delta log files back into the base VMDK. This is a large I/O-heavy read-and-write operation.

Major Factors Affecting Consolidation Time:

Snapshot Size: The larger the snapshot, the more data needs to be read, merged, and written.

Number of Snapshots: Multiple snapshots in a chain increase complexity. The system has to merge snapshots sequentially, increasing consolidation time.

Underlying Storage Performance: Latency and throughput of the datastore, storage contention, queue depths, and backend array performance all directly impact speed of the consolidation.

VM Disk Size and Format: Larger VMDKs take longer to consolidate. Thick provisioning vs thin provisioning can make a difference.

I/O Activity on the VM During Consolidation: If the VM is actively generating disk writes, consolidation must account for redo logs being updated while merging.

Datastore Free Space: Consolidation requires temporary working space. If the datastore is low on free capacity, consolidation may be slow or fail entirely.

ESXi Host Resources: CPU and memory load on the host affect consolidation time. If host is already under constraints, consolidation actions will be assigned a lower priority.

Type of Workload Running on VM: Write-intensive workloads such as databases, mail servers, file servers, etc. tend to consolidate slower because redo logs change rapidly during the process.

Network Latency: Network congestion or poor throughput between host and datastore can impact consolidation speed.

Storage Filters: Third-party backup solutions such as Veeam, Commvault, etc. that use APIs can leave snapshots behind or delay consolidation if not managed properly.

Resolution

Determining Snapshot Size:

1. Access the VM Directory: 
cd /vmfs/volumes/<datastore_name>/<VM_name>/

2. Calculate Total Snapshot Size:
ls -la | grep 'delta|sesparse' | awk '{print $5}' | awk '{ SUM += $1/1024/1024 } END {print "Total Snapshot Size: " SUM " MB"}'

Estimating Consolidation Time Example Calculations:

For a total snapshot size of 2 TB:
At 2 MB/s ~11.5 days
At 3 MB/s ~7.71 days
At 4 MB/s ~5.78 days

For 200 GB of snapshots:
At 2 MB/s ~26 hours
At 3 MB/s ~18 hours
At 4 MB/s ~14 hours

Estimate the completion time by tracking file progress relative to elapsed time. For example, if consolidation moves from 10% to 20% in one hour, the total duration will likely be approximately 10 hours.

Why Snapshot Times Are Estimated and Not Exact:

Precise estimation is difficult because snapshot performance depends on:

  • Disk IOPS of the storage device
  • Average seek time and latency
  • Protocols in use (iSCSI, NFS, Fibre Channel, etc.)

Monitoring Consolidation Progress:

Observe live file changes with:

  1. Access the VM Directory
    cd /vmfs/volumes/datastore/VM_name/  
     
  2. Watch changes every two seconds, highlighting differences:
    watch -n 2 -d 'ls -lth | grep -E "delta|flat|sesparse"'


Using vSphere GUI for Performance Analysis:

To review snapshot-related disk I/O:

  1. In the vSphere client, navigate to the VM.
  2. Monitor > Performance > Advanced
  3. Select the correct datastore under Chart Options
  4. Enable Read Rate and Write Rate
  5. Review IOPS and throughput trends

To view VMDK location:

  1. Right-click VM > Edit Settings
  2. Under each hard disk, check the path to the VMDK file

Additional Information

Notes:
While consolidation can be done with the VM powered on, it's recommended to shut down VMs to maintain data integrity during the process.

The snapshot removal process may take considerable time if the snapshots are large in size.

Snapshot consolidation should never be interrupted, as doing so can cause irreversible corruption of the virtual disks being consolidated.

Virtual machine performance may temporarily degrade while the consolidation process is in progress.

Reference Documents: