Set Your MaxHWTransferSize for vSphere Hosts on VMAX


I finally got around to trying the new settings for MaxHWTransferSize on my VMAX connected vSphere hosts, and it really is a shocking performance boost when doing Storage vMotions.

Basically we’re telling the VAAI hardware assist to use 4x larger chunks to do this data copy in the background.  Net result is any VAAI copy operations finish up quite a bit faster than they did before.

If you haven’t, I recommend you go read Chad’s article on the topic here:

If you don’t feel like reading the article, and just want to get this going in the lab as fast as possible, SSH into your vSphere hosts and issue the following command:

esxcfg-advcfg -g /DataMover/MaxHWTransferSize

This will tell you what it’s currently set to:

Value of MaxHWTransferSize is 4096

Should be 4096.  If not, make a note of it in case you need to roll back.

Then enter this to change to the new setting:

esxcfg-advcfg -s 16384 /DataMover/MaxHWTransferSize

You’ll see the following:

Value of MaxHWTransferSize is 16384

Now go test some SvMotions.

If this somehow breaks, (not that I’ve seen it) change it back to what it was before.

In my preliminary tests, I’m seeing SvMotions that were taking 1:30 to complete, finishing in 26 seconds.

This is an impressive tweak.  Shouts to Chad for the post, and Cody Hosterman for the boost!

Ohh, and remember, do this only if your hosts are exclusively connecting to VMAX arrays.  It could break on other arrays.

  1. Any idea if we can use powercli to make this change.

    Set-VMHostAdvancedConfiguration -VMHost (Get-VMHost $vmhost) -Name DataMover.MaxHWTransferSize -Value 16384 ???? i tried this but this doesnt work ?

    1. I don’t believe you can. I think the general rule (or at least in my experience) options that aren’t in the GUI can’t be changed by anything besides esxcfg, not powercli etc.

      1. it is sad cuz i get the value using Get-VMHostAdvancedConfiguration -VMHost (Get-VMHost $vmhost) DataMover.MaxHWTransferSize but cant set it 🙁

          1. You actually can set this with PowerCLI (thank goodness!)

            $myhost | Get-AdvancedSetting -Name “DataMover.MaxHWTransferSize” | Set-AdvancedSetting -Value 16384

Comments are closed.