How to throttle the unmap requests on Datastore ( Space Reclamation )
search cancel

How to throttle the unmap requests on Datastore ( Space Reclamation )

book

Article ID: 391805

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Guidance on modifying the "unmap" ( Space Reclamation Settings ) in VMware environment.

Impact/Risks:

Failure to follow the requirements may result in undesired outcomes such as poor performance

 

Environment

VMware ESXi 8.0U3

Resolution

Space Reclamation Settings:

Following steps will allow to change Space Reclamation Settings or disabled it supported onwards vSphere 8.0 U3 

  • In the vSphere Client, navigate to the datastore

  • Select Edit Space Reclamation from the right-click menu.
     
  • Specify the space reclamation setting.
Option
Description
Enable automatic space reclamation at fixed rate
Use the fixed method for space reclamation. Specify reclamation bandwidth in MB per second.
Disable automatic space reclamation
Deleted or unmapped blocks are not reclaimed.
  • Click OK to save the new settings. In the "Enable automatic space reclamation at fixed rate" the reclamation rate can be set for 10MB/s,100MB/s ,200MB/s ,300MB/s till 1900MB/s from drop down menu
     
  • Unmount and remount the datastore for the changes to take place.
     
    • Unmount Datastores.
    • Mount Datastores.

  • Repeat this procedure for all ESXi hosts that access the datastore.

  • The modified value for the space reclamation priority appears on the General page for the datastore.

PATH :  vCenter vSphere UI > Datastore View > Select the Datastore > Configure > General > Space  Reclamation  > edit 



  • Click Edit > Select the Reclamation rate from drop down



NOTE :

1. VMware does not recommend to disable or modify the "unmap" operations unless otherwise specified by the end Storage vendor and VMware.

2.The changes in default "Space Reclamation Settings" may deviates from the system defaults and can have other unintended behaviors.

 

Additional Information

 In the ESXI 8.0 U3. the unmap can be adjusted in vSphere UI and command line

Monitoring Automatic Unmap I/O Issued by ESXi

On VMFS datastores, storage space is reclaimed when:

    • A VM is deleted.

    • A VM is migrated using vSphere Storage vMotion.

    • A snapshot is deleted or consolidated.

Within a Guest OS, storage space is freed when files are deleted. Most modern Guest OSs send these storage releases as Unmap commands to VMFS automatically. However, not all Guest OSs support automatic Unmap functionality.

With VMFS6, VMware introduced automatic tracking of free blocks. This feature enables background, asynchronous Unmap operations on datastores created with thin-provisioned storage LUNs.

Benefits of Asynchronous Automatic Unmap Processing

  1. Controlled Resource Usage:
    Unmap requests are sent at a consistent rate, preventing burst loads on storage arrays.

  2. Efficient Resource Reclamation:
    Freed regions are batched and unmapped together for optimal efficiency.

  3. Minimized Performance Impact:
    Unmap processing is decoupled from truncate I/O paths, ensuring I/O performance remains unaffected.

SCSI Opcodes:

This is a list of commonly used SCSI opcodes related to VAAI - VMware vStorage APIs for Array Integration.
 
SCSI commands SCSI operation by command
0x93 WRITE SAME(16)
0x41 WRITE SAME(10)
0x42 UNMAP
0x89 SCSI COMPARE and WRITE - ATS
0x83 EXTENDED COPY
 
Reference KB :