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

How to calculate current snapshot size, estimate consolidation time 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. 

Understanding Snapshot Consolidation
Snapshot consolidation is typically needed in these cases:

  1. Backup Tools or External Snapshot Operations:
    Tools like Commvault, Veeam often create and remove snapshots automatically.
    If removal fails (e.g., network loss, lock timeout), consolidation is flagged.

  2. Snapshot Deletion Failure:
    User deletes a snapshot, but the merge process fails due to:
    1. File locks
    2. Host crash or power interruption

  3. Long Snapshot Chains or Orphaned Files:
    1. Multiple snapshots chained
    2. 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 is required.

Environment

VMware vSphere 7.x
VMware vSphere 8.x

Cause

Why Snapshot Consolidation Takes Time?

Snapshot consolidation involves merging delta (redo) log files back into the base VMDK. This is essentially a large I/O-heavy read-and-write operation. The time depends on:

Major Factors Affecting Consolidation Time

  1. Snapshot Size (delta or sesparse File Size)

    • The larger the snapshot, the more data needs to be read, merged, and written.

    • Example: A 1 GB snapshot merges quickly, but a 500 GB snapshot can take hours.

  2. Number of Snapshots

    • Multiple snapshots in a chain increase complexity.

    • The system has to merge them sequentially, increasing consolidation time.

  3. Underlying Storage Performance

    • Latency and throughput of datastore (SAN/NAS/vSAN/local SSD).

    • Storage contention, queue depths, and backend array performance directly impact speed.

  4. VM Disk Size and Format

    • Larger VMDKs take longer to consolidate.

    • Thick-provisioned eager zeroed disks vs thin-provisioned can also make a difference.

  5. 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.

    • This introduces additional overhead and slows down the process.

  6. Datastore Free Space

    • Consolidation requires temporary working space.

    • If datastore is low on free capacity, consolidation may be slow or even fail.

  7. ESXi Host Resources

    • CPU and memory load on the host.

    • If host is already under pressure, consolidation gets lower priority.

  8. Type of Workload Running on VM

    • Write-intensive workloads (databases, mail servers, file servers) tend to make consolidation slower because redo logs change rapidly during the merge.

  9. Network Latency (if using vSAN, NFS, or iSCSI storage)

    • Network congestion or poor throughput between host and datastore impacts speed.

  10. VMware Tools / Storage Filters

    • Third-party backup solutions (e.g., Veeam, Commvault) that use APIs can leave snapshots behind or delay consolidation if not managed properly.

Resolution

Determining Snapshot Size
To estimate the size of all snapshots and calculate time required for consolidation:

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"}'
ls -la | grep 'delta|sesparse' | awk '{print $5}' | awk '{ SUM += $1/1024/1024/1024 } END {print "Total Snapshot Size: " SUM " GB"}'

Note: Ensure that the datastore has at least 1.5x the size of the total snapshot data before attempting consolidation. If the datastore usage is 99% or more, free up space before proceeding.

Estimating Consolidation Time:
The estimated I/O speed for consolidation ranges from 2 MB/s to 4 MB/s depending on the VM workload and storage backend.

Example Calculations:
For a total snapshot size of 2 TB:
At 2 MB/s → ~11.57 days
At 3 MB/s → ~7.71 days
At 4 MB/s → ~5.78 days

For 200 GB of snapshots:
At 2 MB/s → ~1.15 days
At 3 MB/s → ~18.5 hours
At 4 MB/s → ~13.9 hours

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

Why Snapshot Times Are Estimated (Not Exact):

Precise estimation is difficult because snapshot performance depends on:

1. Disk IOPS (Input/Output Operations Per Second)
2. Average seek time and latency
3. Protocols in use (iSCSI, NFS, Fibre Channel, etc.)

  • To calculate this disk's IOPS, use the following equation:
    IOPS = 1/(avgLatency + avgSeek)

  • Timestamp-Based Speed Estimation:
    You can compare timestamps of snapshot files to determine consolidation speed:
    find */VM_name/ -type f -exec ls -lath {} \; | grep -E "delta|sesparse"

Monitoring Consolidation Progress:

You can observe live file changes with:

cd /vmfs/volumes/datastore/VM_name/
watch -d 'ls -lth | grep -E "delta|flat|sesparse"'

Or, use vim-cmd to track snapshot tasks:

vim-cmd vmsvc/getallvms | grep VM_name
vim-cmd vimsvc/task_list <vmid>
vim-cmd vimsvc/task_info <task_id>


Using vSphere GUI for Performance Analysis

To review snapshot-related disk I/O:

1. Navigate to the VM → Monitor > Performance > Advanced
2. Select the correct datastore under Chart Options
3. Enable Read Rate and Write Rate
4. 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

NOTE:

  • 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.


 

Additional Information

Reference Documents: