VMware Cloud Community
tdubb123
Expert
Expert

simultaneous unmap sessions limit

is there a limit or recommendation on how many simulataneous unmap commands I can run per datastore simultaneously on a single host?

I got over 100 luns attached to a cluster and I want to run unmap on all the luns simultaneously

2 Replies
compwizpro
Enthusiast
Enthusiast

What VMFS version are you running?  If you are running VMFS 6, it will unmap automatically asynchronously during low IO periods and you can specify a maximum unmap throughput in MB/s as well.  That way it is taken care of automatically minimizing impact to the array.

If you are VMFS 5, I would recommend upgrading to VMFS 6 to take advantage of the feature above.  There is a great article on how to do this somewhat automatically using the Update-Vmfsdatastore powercli cmdlet. 

If none of that is possible, I would consult the storage vendor on maximum recommended unmap rate in order to avoid performance degradation and do one datastore at a time to avoid impact. 

pragg12
Hot Shot
Hot Shot

Hi,

I would avoid running unmap on all 100 LUNs simultaneously since there would be a performance impact on VMs. Also, you will require 100 hosts to run unmap on 100 LUNs simultaneously since you have to wait till unmap finishes on 1 LUN before proceeding with next LUN.

I would recommend scripting this. Run 2-3 instances of same script with different names and different parameters (different ESXi hosts and LUN names/IDs) so the unmap would be running on 2-3 LUNs simultaneously without impacting your Production. Also, do this in 2-3 phases. Make sure you are running these in Off Business hours or at time when the IOs on the LUNs are minimal to ensure optimal performance.

Refer to below links for scripts:. However, please try them at your own risk and test them thoroughly before using in your infrastructure.

Reclaim space with PowerCLI

Perform VMFS UNMAP using PowerCLI

compwizpro​ has provided valid points. In addition to them, you need to confirm with your storage team if automatic claiming is supported/enabled on the current version of storage product. Since I have faced this issue where ESXi is trying to auto reclaim space in VMFS 6 but the current storage product version does not support it.

Consider marking this response as "Correct" or "Helpful" if you think my response helped you in any way.