Monday, August 12, 2013

VMWare ESXi 5.x / 6.x changing the IOPS setting

vSphere has Native Multi Pathing (NMP) that offers the Round Robin (RR) Path Selection Policy (PSP).  Round Robin send all IOPS down a single active path until the number of IOPS sent down that path reaches the limit defined by the IOOperation Limit setting before it moves to the next available active path.  It will cycle through all active paths.

The default setting for Round Robin PSP is 1000 IOPS. 

Changing the IOPS setting is done through the vSphere CLI.  The commands below are for ESXi 5.x , the commands are different for ESXi 4.x.

ESXi 5.x
Set the IOPS for a datastore

esxcli --server=192.168.1.10 --username=root storage nmp psp roundrobin deviceconfig set -d naa.600xxxxxxxxxxxxxxxxxxxxxx -t iops -I 1    (changes setting to 1)


Check the IOPS setting for a datastore

esxcli --server=192.168.1.10 --username=root storage nmp psp roundrobin deviceconfig get -d naa.600xxxxxxxxxxxxxxxx


Set the IOPS back to default (1000)
esxcli --server=192.168.1.10 --username=root storage nmp psp roundrobin deviceconfig set -d naa.600xxxxxxxxxxxxxxxxxxxxxx -t default


NOTE:
- the setting must be set FOR EACH datastore on EACH host
- can also have the setting change by number of bytes instead of each IOP
       -t bytes -B 262144   (would change setting to switch paths every 256K)


VMWare KB article,  http://kb.vmware.com/kb/2069356

for i in `esxcfg-scsidevs -c |awk '{print $1}' | grep naa.xxx`; do esxcli storage nmp psp roundrobin deviceconfig set --type=iops --iops=1 --device=$i; done