Knowledge Base
The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides

|
Changing the queue depth for QLogic, Emulex and Brocade HBAs (1267)
Details
When one virtual machine is active on a LUN, you only need to set the maximum queue depth. When multiple virtual machines are active on a LUN, the
Disk.SchedNumReqOutstanding value is also relevant. The queue depth value, in this case, is equal to whichever value is the lowest of the two settings: adapter queue depth or Disk.SchedNumReqOutstanding.- To set the
Disk.SchedNumReqOutstandingvalue, see Setting the Maximum Outstanding Disk Requests for virtual machines (1268). - For more information about setting queue depth for an Emulex host bus adapter (HBA) on ESX 3.0, see Setting the Queue Depth for an Emulex HBA on ESX Server 3.0 (8535211).
- For more information about how storage queues affect performance, see Storage Queues and Performance on the VMware Communities.
- For more information about the default values and configuration options for the QLogic VMware drivers, see Fibre Channel Adapter for VMware ESX User's Guide.
- For more information on the command line parameters and other details on the QLogic Fibre Channel Driver, see QLogic Fibre Channel Driver for Kernel 2.6.x on the QLogic site.
- For more information about the default values and configuration options for the Emulex VMware drivers, see the Emulex Driver for VMware ESX User Manual.
- For more information on controlling the LUN queue depth throttling, see Controlling LUN queue depth throttling in VMware ESXi/ESX (1008113).
- For information on how to check the current values of the storage adapter and storage device queue depth, see Checking the queue depth of the storage adapter and the storage device (1027901).
Note: The preceding links were correct as of May 2, 2013. If you find a link is broken, provide feedback and a VMware employee will update the link.
Solution
| ESXi/ESX version | Queue depth |
| 3.5 with driver version 6.04 | 16 |
| 3.5 with driver version 6.07 & 7.x | 32 |
| 4.0 | 32 |
| 4.1 | 32 |
| 5.0 | 64 |
| 5.1 | 64 |
The default Queue Depth value for Emulex adapters has not changed for all versions of ESXi/ESX released to date. The Queue Depth is 32 by default, and because 2 buffers are reserved, 30 are available for I/O data.
The default Queue Depth value for Brocade adapters is 32.
Notes:
- VMware recommends keeping the HBA Vendors uniform across all hosts participating in a cluster. If you are using a mixed environment (for example, with QLogic and Emulex), VMware recommends keeping the Queue Depth value the same across all the hosts in the cluster.
- If you are applying a host profile which includes Queue Depth settings and a host reboot is required after application, note that queue depth values can only be modified at boot time. Reboot the host and confirm that the Queue Depth values are set correctly. The capability to modify Queue Depth variables is reliant on a compatible driver, and some async drivers may not allow the Queue Depth to be set correctly.
ESXi 5.x
To adjust the queue depth for an HBA:- Verify which HBA module is currently loaded by entering one of these commands on the service console:
- For QLogic:
# esxcli system module list | grep qla - For Emulex:
# esxcli system module list | grep lpfc - For Brocade:
# esxcli system module list | grep bfa
- For QLogic:
- Run one of these commands:
Note: The examples show the QLogicqla2xxxand Emulexlpfc820modules. Use the appropriate module based on the outcome of the previous step.- For QLogic:
# esxcli system module parameters set -p ql2xmaxqdepth=64 -m qla2xxx - For Emulex:
# esxcli system module parameters set -p lpfc0_lun_queue_depth=64 -m lpfc820 - For Brocade:
# esxcli system module parameters set -p bfa_lun_queue_depth=64 -m bfa
- In these commands, both
ql2xmaxqdepthandlpfc0use the lowercase letter L, "l", and not the numeric digit1. - In this case, the HBAs represented by
ql2xandlpfc0have their LUN queue depths set to64. - If all Emulex cards on the host must be updated, apply the global parameter,
lpfc_lun_queue_depthinstead.
- For QLogic:
- Reboot your host.
- Run this command to confirm that your changes have been applied:
# esxcli system module parameters list -m driver
Wheredriveris your QLogic, Emulex, or Brocade adapter driver module, such aslpfc820,qla2xxx, orbfa.
The output appears similar to:Name Type Value Description
-------------------------- ---- ----- --------------------------------------------------
.....
ql2xmaxqdepth int 64 Maximum queue depth to report for target devices.
.....
ESXi/ESX 4.x
To adjust the queue depth for an HBA:- Verify which HBA module is currently loaded by entering one of these commands on the service console:
- For QLogic:
# vmkload_mod -l | grep qla - For Emulex:
# vmkload_mod -l | grep lpfc - For Brocade:
# vmkload_mod -l | grep bfa
- For QLogic:
- Run one of these commands:
Note: The examples show the QLogicqla2xxxand Emulexlpfc820modules. Use the appropriate module based on the outcome of the previous step.- For QLogic:
# esxcfg-module -s ql2xmaxqdepth=64 qla2xxx - For Emulex:
# esxcfg-module -s 'lpfc0_lun_queue_depth=64' lpfc820 - For Brocade:
# esxcfg-module -s 'bfa_lun_queue_depth=64' bfa
In this case, the HBAs represented byql2xandlpfc0have their LUN queue depths set to64.
Note: For multiple instances of Emulex HBAs being presented to a system, use:# esxcfg-module -s 'lpfc0_lun_queue_depth=64 lpfc1_lun_queue_depth=64' lpfc820 - For QLogic:
- Reboot your host.
- Run this command to confirm if your changes are applied:
# esxcfg-module -g driver
Wheredriveris your QLogic, Emulex, or Brocade adapter driver module, such aslpfc820,qla2xxx, orbfa.
ESXi/ESX 3.5
To adjust the queue depth for a QLogic HBA:- Log into the service console as root.
- Verify which QLogic HBA module is currently loaded:
# vmkload_mod -l | grep qla
Depending on the model of the HBA, the module can be one of these:qla2300_707_vmwqla4010qla4022
- Run these commands:
# esxcfg-module -s ql2xmaxqdepth=64 qla2300_707_vmw
# esxcfg-boot –b
The HBA represented byql2xhas its LUN queue depth set to64.
Note: The example shows theqla2300_707module. Use the appropriate module based on the output of step 2. - Reboot the host.
- Run this command to confirm your changes have been applied:
# esxcfg-module -g driver
Wheredriveris your QLogic, Emulex, or Brocade adapter driver module, such aslpfc820,qla2xxx, orbfa.
To adjust the queue depth of an Emulex HBA:
- Log into the service console as root.
- Verify which Emulex HBA module is currently loaded:
# vmkload_mod -l | grep lpfc - For a single instance of an Emulex HBA on the system, run these commands:
Note: The example shows thelpfc_740module. Use the appropriate module based on the output of step 2.# esxcfg-module -s lpfc0_lun_queue_depth=64 lpfc_740
# esxcfg-boot –b
In this case, the HBA represented bylpfc0has its LUN queue depth set to64. - For multiple instances of an Emulex HBA present on the system, run these commands:
# esxcfg-module -s "lpfc0_lun_queue_depth=64 lpfc1_lun_queue_depth=64" lpfc_7xx
# esxcfg-boot –b
In this case, both HBAslpfc0andlpfc1have their LUN queue depths set to64. - Reboot the host.
- Run this command to confirm your changes have been applied:
# esxcfg-module -g driver
Wheredriveris your QLogic, Emulex, or Brocade adapter driver module, such aslpfc820,qla2xxx, orbfa.
ESX 2.x
To adjust the queue depth of the QLogic adapter on ESX 2.x:- In a text editor, edit the
/etc/vmware/hwconfigfile and locate the line for the QLogic adapter. It looks similar to:device.3.12.0.name = "QLogic Corp QLA2312/2340 (rev 02)"
Make note of the string of three numbers betweendeviceandname. - In the
/etc/vmware/hwconfigfile, add one of these lines to the end of the file:- For ESX Server 2.0, add this line:
device.vmnix.3.12.0.options = "ql2xmaxqdepth=nn" - For ESX Server 2.1 and later versions, add this line:
device.esx.3.12.0.options = "ql2xmaxqdepth=nn"
In these examples,3.12.0is the string of numbers obtained from the QLogic line located in the previous step, andnnis the desired queue depth maximum. Be sure to save your changes.
Note: The second character inql2xmaxqdepthis a lowercase L, "l".
- For ESX Server 2.0, add this line:
- Reboot the host.
Tags
Keywords
Update History
Request a Product Feature
To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.
Actions
KB:
- Updated:
- Categories:
- Languages:
- Product Family:
- Product(s):
- Product Version(s):

