This article explains the automatic SCSI unmap operation performed by ESXi for space reclamation.
With VMFS-6, space reclamation is now an automatic, asynchronous process. This means that the space will not be reclaimed instantly but gradually over time. As a result, you may need to monitor the process to track progress.
In this article explains the automatic unmap for VMFS-6:
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
How to check the automatic unmap I/O per VMFS6 datastore/volume issued by an ESXi host.and check if automatic unmap I/O has been issued by an ESXi host.
# vsish
/> cd /vmkModules/vmfs3/auto_unmap/volumes//> ls
/> get /vmkModules/vmfs3/auto_unmap/volumes/<datastoreName>/properties
vsish -e get /vmkModules/vmfs3/auto_unmap/volumes/<datastoreName>/properties
Sample output:
Volume specific unmap information { Volume Name :<datastoreName> Volume: Num SchedQs :1 FS Major Version :24 Metadata Alignment :4096 Allocation Unit/Blocksize :1048576 Unmap granularity in File :1048576 Volume: Unmap IOs :1446 Volume: Unmapped blocks :85135 Volume: Num wait cycles :1 Volume: Num from scanning :3948 Volume: Num from heap pool :391 Volume: Total num cycles :961963 Unmaps processed in last minute:0 Volume: Unmap SchedQ IOs :1446}
How to monitor the Umap activity via ESX top.
On the far right, you will see delete stats, aka UNMAP:
Note :
On VMFS datastores, storage space is released in several ways:
Within the Guest OS, storage space is freed when files are deleted. Most modern Guest OSes automatically send these frees as "Unmaps" to the VMFS datastore. However, not all Guest OS support automatic Unmaps.
In VMFS6, VMware has enhanced this process by supporting the automatic tracking of free blocks, which is then used for periodic asynchronous Unmap operations. This feature is available only for datastores created on Thin Provisioned Storage LUNs.
Asynchronous automatic Unmap processing provides several key benefits:
Non-zero values for Volume: Unmap IOs and Volume: Unmapped Blocks indicate that automatic unmap I/Os have been issue by a host for a given VMFS6 volume since last reboot.
Check the output at intervals (e.g. daily) for incrementing values of Volume: Unmap IOs and Volume: Unmapped Blocks to confirm ongoing issue of automatic unmap I/Os to the volume on the host.
Unmap metrics can also be monitored via the VAAI stats on esxtop - see Monitoring VMware vSphere Storage APIs – Array Integration using esxtop and maintaining the status as enabled. Note, however, that esxtop unmap metrics will include any manual unmap IOs issued, as well as automatic unmap IOs.
External Link : Monitoring Automatic VMFS-6 UNMAP in ESXi