Deleting or removing files from a VMFS datastore frees space within the file system. This free space is mapped to a storage device until the file system releases or unmaps it. ESXi supports reclamation of free space, which is also called the unmap operation.
The operation helps the storage array to reclaim unused free space. Unmapped space can be then used for other storage allocation requests and needs.
Asynchronous Reclamation of Free Space on VMFS6 Datastore
On VMFS6 datastores, ESXi supports the automatic asynchronous reclamation of free space. VMFS6 can run the unmap command to release free storage space in the background on thin-provisioned storage arrays that support unmap operations.
- Unmap requests are sent at a constant rate, which helps to avoid any instant load on the backing array.
- Freed regions are batched and unmapped together.
- Unmap processing and truncate I/O paths are disconnected, so I/O performance is not impacted.
For VMFS6 datastores, you can configure the following space reclamation parameters at datastore creation time.
- Space reclamation granularity
- Granularity defines the minimum size of a released space sector that underlying storage can reclaim. Storage cannot reclaim those sectors that are smaller in size than the specified granularity.
- Space reclamation priority
- This parameter defines the rate at which the space reclamation operation is performed. Typically, VMFS6 can send the unmap commands either in bursts or sporadically depending on the workload and configuration. When you create a VMFS6 datastore, you can specify one of the following options.
After you enable space reclamation, the VMFS6 datastore can start releasing the blocks of unused space only when it has at least one open file. This condition can be fulfilled when, for example, you power on one of the VMs on the datastore.
Manual Reclamation of Free Space on VMFS5 Datastore
VMFS5 and earlier file systems do not unmap free space automatically, but you can use the esxcli storage vmfs unmap command to reclaim space manually. When you use the command, keep in mind that it might send many unmap requests at a time. This action can lock some of the resources during the operation.