This HBA queue depth calculator checks a per-LUN queue depth setting against the limits of the HBA port and of the array target port, and suggests the highest value that stays inside both. It lists the documented defaults for common ESXi and Linux drivers, so you know what you started from. Use it before you raise a queue depth to chase performance.
Result
The result updates automatically as you change any input.
Formula and worked steps
Formulas used
- Outstanding per HBA port = LUNs x per-LUN depth
- Outstanding per target port = initiators x LUNs x per-LUN depth
- Recommended per-LUN depth = floor(limit / sources), lowest across the limits you enter
- Effective depth = lowest of adapter depth and device-level limit
- Defaults are the documented values: ESXi QLogic 64 (5.0 to 8.0), ESXi Emulex 64 (lpfc 12.8.317 and later; older 32 with 30 usable), ESXi Brocade 32, Linux qla2xxx 64 (RHEL 7.5 and later; 32 earlier), Linux lpfc 30. Windows depends on the driver and HBA utility, so enter your value.
- HBA and target port limits are not built in because they vary by hardware; enter them from documentation.
- The worst case assumes every LUN queue fills on every initiator at once.
What is queue depth on an HBA?
Queue depth is how many I/O requests a host can have outstanding at once. The HBA driver sets a depth for each LUN, and the HBA and the array each have a limit on the total they can hold. Exceed a limit and the I/O is rejected or delayed.
Per-LUN, per-port and per-target limits
The per-LUN depth caps outstanding I/O to one LUN. The HBA port has a total limit across all its LUNs. The array’s target port has a total limit across every host that uses it, which is usually the tightest of the three in a shared SAN.
Documented defaults
Drivers ship with their own default depth. ESXi with the QLogic qlnativefc driver defaults to 64 (parameter ql2xmaxqdepth). The Emulex lpfc driver defaults to 64 from version 12.8.317, and earlier drivers used 32 with 30 usable. The Brocade bfa driver defaults to 32. On Linux, the qla2xxx driver defaults to 64 from RHEL 7.5 and 32 before that, and lpfc uses 30 (lpfc_lun_queue_depth). Windows depends on the driver and HBA utility, so read yours.
The ESXi device-level limit
On ESXi, when several virtual machines share a LUN, the effective depth is the lower of the adapter’s queue depth and a per-device outstanding-request limit. Raising only the adapter setting can have no effect.
How the HBA queue depth calculator works
Choose the driver preset, which fills the per-LUN depth, and enter the LUNs per HBA port, the initiators that share each target port and, if you know them, the limits. The tool then works out the worst case for each port.
Formulas
- Effective per-LUN depth = lowest of the adapter depth and any device-level limit
- Outstanding per HBA port = LUNs x per-LUN depth
- Outstanding per target port = initiators x LUNs x per-LUN depth
- Recommended depth = limit / number of sources, rounded down, taking the lowest across the limits you enter
Worked example
Take a depth of 64 on 20 LUNs, with 8 initiators sharing each target port. The HBA port can have 20 x 64 = 1,280 commands outstanding, and the target port 8 x 20 x 64 = 10,240. Against an example HBA limit of 1,024 and a target port limit of 2,048, that is 125% and 500%. The HBA limit alone allows floor(1,024 / 20) = 51, and the target port allows floor(2,048 / 160) = 12, so the recommended depth is 12.
| Check | Outstanding | Limit | Result |
|---|---|---|---|
| HBA port | 1,280 | 1,024 | Over |
| Target port | 10,240 | 2,048 | Over |
At depth 12, the target port sees 8 x 20 x 12 = 1,920, which is within 2,048, and the HBA port sees 240.
Why the worst case
The calculation assumes every LUN queue fills on every host at once. That seldom happens, so the recommendation is conservative. It is still the right starting point for a shared array, because the failure it prevents, queue-full responses that stall many hosts together, is severe.
Why it matters for SAN and storage admins
Queue depth is one of the few host settings that can affect every other host on the array. A single server tuned to a high depth can fill a shared port and push everyone else into queue-full conditions, which show up as latency spikes on unrelated systems. The HBA queue depth calculator shows the effect of a setting on the shared port before you apply it.
It also brings discipline to tuning. Many settings are copied from a forum post or an old runbook. Starting from the documented default, computing the limits and changing one thing at a time is slower to type and faster to finish.
Use it when you:
- Change a queue depth parameter on a host.
- Add hosts or LUNs to a shared target port.
- Compare driver defaults across operating systems.
- Write the reasoning for a setting into a runbook.
Best practices and common mistakes
- Take the HBA and target port limits from the vendor documentation for your exact model and version.
- Keep the setting the same on hosts that share a target port.
- Change one layer at a time and watch latency and queue-full counters, not only IOPS.
- Remember that driver parameters generally need a reload or reboot to take effect.
- Re-check after adding LUNs, because the total scales with the LUN count.
- Do not copy a value between OS versions without confirming the default.
A frequent mistake is to raise the depth on one important host and ignore the shared port. The host benefits briefly, and the rest of the SAN pays.
FAQs
What is the default HBA queue depth?
It depends on the driver. Documented per-LUN defaults include 64 for QLogic on ESXi and Linux, 64 for current Emulex lpfc on ESXi, 32 for Brocade bfa on ESXi, and 30 for Emulex lpfc on Linux.
How do I choose a safe per-LUN queue depth?
Divide the smallest relevant port limit by the number of queues that can fill it. For a target port, that is initiators times LUNs. Round down.
Does raising queue depth always improve performance?
No. It helps only while the device can use more outstanding I/O. Past that point it adds latency, and it can overrun a shared target port.
Next, try the queue depth calculator, the SAN fan-out ratio calculator and the IOPS calculator, or browse the full list of storage calculators.