EMC XtremIO – Setting Disk.SchedNumReqOutstanding On vSphere 5.5 & 6.0 (PowerCLI)

PowerCLI Download

Disk.SchedNumReqOutstanding (DSNRO) – Determines the maximum number of active storage commands (I/Os) allowed at any given time at the VMkernel. The default value is 32 and the maximum value is 256. For XtremIO storage with VMware vSphere it is recommended to set the DSNRO parameter to the maximum value of 256.

When using vSphere 5.5 the Disk.SchedNumReqOutstanding parameter needs to be set at the individual Host LUN level (Per Device Setting). Prior to vSphere 5.5 the DSNRO value was globally set for all volumes presented to the ESX host (Per Host Setting). vSphere 5.5 has made the DSNRO parameter change more granular for a good reason; rather than setting the parameter at the Host level which would affect all connected storage (regardless of array specific guidelines) you can now set the value on a per LUN basis.

Note: For this Per LUN/Device configuration (Disk.SchedNumReqOutstanding) change to be effective then it is important to align the maximum queue depth of the FC HBA with the LUN queue depth. In other words the lowest queue depth value will be the effective queue depth if there is a difference between both.

I will provide two examples of how to use PowerCLI in order to set the DSNRO parameter to the maximum value of 256 (the recommended XtremIO value). The first example changes the parameter for a single Device on a specific ESX Host. The second example details setting the DSNRO parameter for all XtremIO specific Devices presented to all ESX Hosts connected to vCenter.

Example 1: Setting the DSNRO Parameter for a Single Device on a specific ESX Host:

1. Connect to vCenter:
Connect-VIServer -Server ‘vCenter_IP’ -User ‘administrator@vsphere.local’ -Password ‘Password’

2. Retrieve Cluster name and Host name:
Get-Cluster
Get-Cluster ‘Cluster_Name’ | Get-VMHost | Select Name

3. Using your ESX Hostname you can list the presented devices in order to gather the naa.* value associated with the XtremIO LUN:
$esxcli=get-esxcli -VMHost ‘ESX_Host_Name’
$esxcli.storage.core.device.list()

DSN1

4. Set the DSNRO parameter to the max value of 256 for the XtremIO device ‘naa.514f0c58b3600023’:
$esxcli.storage.core.device.set($null, “naa.514f0c58b3600023”, $null, $null, $null, $null, $null, 256, $null)

5. List the details of the Device after the parameter change is made:
$esxcli.storage.core.device.list(“naa.514f0c58b3600023”)

DSN2

Example 2: Setting the DSNRO parameter for all XtremIO Devices presented to all ESX Hosts:
The following script changes the DSNRO parameter for all XtremIO devices on all hosts connected to vCenter Server. Thanks @CliffCahill for providing this very useful script.

1. Connect to vCenter:
Connect-VIServer -Server ‘vCenter_IP’ -User ‘administrator@vsphere.local’ -Password ‘Password’

2. Return the XtremIO Model Name as per vSphere:
$esxcli=get-esxcli -VMHost ‘ESX_Host_Name’
$esxcli.storage.core.device.list() | Select Model

DSN3

3. Change the DSNRO parameter for all XtremIO devices presented to all ESX Hosts:

Script for vSphere 5.5:
$EsxHosts = get-vmhost
foreach ($esx in $EsxHosts)
{
$esxcli = Get-EsxCli -VMHost $esx
$devices = $esxcli.storage.core.device.list()
foreach ($device in $devices)
{
if ($device.Model -like "XtremApp")
{
$esxcli.storage.core.device.set($null, $device.Device, $null, $null, $null, $null, $null, 256, $null)
}
}
}

Script for vSphere 6.0:
$EsxHosts = get-vmhost
foreach ($esx in $EsxHosts)
{
$esxcli = Get-EsxCli -VMHost $esx
$devices = $esxcli.storage.core.device.list()
foreach ($device in $devices)
{
if ($device.Model -like “XtremApp”)
{
$esxcli.storage.core.device.set($false, $null, $device.Device, $null, $null, $null, $null, $null, $null, $null, $null, ‘256’,$null,$null)
$esxcli.storage.core.device.list()
}
}
}

4. List all XtremIO devices and outputs results to ‘xio.txt’ in order to confirm the changes were made successfully:

$EsxHosts = get-vmhost
foreach ($esx in $EsxHosts)
{
$esxcli = Get-EsxCli -VMHost $esx
$esxcli.system.hostname.get() | ft Hostname | Out-file -Append -Noclobber "c:\XtremIO\xio.txt"
$esxcli.storage.core.device.list() | Where-Object {$_.Model -like "XtremApp"} | ft Vendor,Device,Size, NoofoutstandingIOswithcompetingworlds | Out-file -Append -Noclobber "c:\XtremIO\xio.txt"

}

9 thoughts on “EMC XtremIO – Setting Disk.SchedNumReqOutstanding On vSphere 5.5 & 6.0 (PowerCLI)

  1. Hi Dave – Rather than using ” | more” command try the FT function . Make it more readable and nicely formatted

    $EsxHosts = get-vmhost
    foreach ($esx in $EsxHosts)
    {
    $esxcli = Get-EsxCli -VMHost $esx
    $devices = $esxcli.storage.core.device.list()
    foreach ($device in $devices)
    {
    if ($device.Model -like “XtremApp”)
    {
    $esxcli.storage.core.device.list() | ft Vendor,Device,Size, NoofoutstandingIOswithcompetingworlds
    }
    }
    }

  2. Dave – Updates are required for vSphere 6.0 :/

    $EsxHostsa = get-vmhost
    foreach ($esxa in $EsxHostsa)
    {
    $esxcli = Get-EsxCli -VMHost $esxa
    $devices = $esxcli.storage.core.device.list()
    foreach ($device in $devices)
    {
    if ($device.Model -like “XtremApp”)
    {
    $esxcli.storage.core.device.set($false, $null, $device.Device, $null, $null, $null, $null, $null, $null, $null, $null, ‘256’,$null,$null)
    $esxcli.storage.core.device.list()

    }
    }
    }

  3. This should give us the results for the same

    foreach ($VMHost in (get-vmhost | sort))
    {
    $VMHost.Name
    (Get-EsxCli -VMHost $VMHost).storage.core.device.list() | where vendor -eq “XtremIO” | select Vendor, Device, NoofoutstandingIOswithcompetingworlds | ft
    }

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s