Host bus adapter (HBA)
A host bus adapter (HBA) connects a server's I/O bus, such as PCI Express, to a storage transport such as SAS, SATA or Fibre Channel and holds the initiator ports.
In the Linux SCSI subsystem a host is a bridge between a computer I/O bus such as PCI and a single SCSI initiator port, which sends commands to target ports such as disks, and one HBA may contain several hosts. The driver reports per-host limits, namely outstanding commands (can_queue), scatter-gather elements per command (sg_tablesize) and sectors per command (max_sectors). The default of 1,024 sectors gives a 512 KB maximum transfer with 512-byte sectors. [2]
For SATA, the AHCI register model allows 32 ports per controller and 32 command slots per port, with capability bits for native command queueing, 64-bit DMA, port multipliers and staggered spin-up. The Linux driver uses 168 scatter-gather entries per command against a hardware maximum of 64K. [3] A fully populated controller can therefore have 32 x 32 = 1,024 commands outstanding.
In an older SAS generation each phy runs at 300 MB/s half duplex, so an eight-link card has 2,400 MB/s. A narrow port has one phy and a wide port typically four, direct-attached drives are limited to the number of phys, and with expanders a card typically reaches 128 end devices. An edge expander connects up to 128 SAS ports and a fanout expander up to 128 edge expanders, giving up to 16,384 ports in one SAS domain. [4]
Relations
- related
- Serial Attached SCSI (SAS), Fibre Channel, NVMe, AHCI, SCSI initiator and target, PCIe lanes (storage)
Limitations
- A narrow port to a single drive gets one phy's rate, so bandwidth depends on how many links are aggregated. [4]
Citations
- SCSI mid_level - lower_level driver interface, Linux kernel documentation
- drivers/ata/ahci.h, Common AHCI SATA definitions, Linux kernel source
- Introduction to Serial Attached SCSI (appendix G), Oracle documentation
Further reading
Sources & caveats
- c2 and c3 are Linux kernel documentation and source (master branch); c3 is a driver header, not the AHCI specification, whose download was not accessible.
- c4 is an appendix of an Oracle HBA installation guide, not the T10 SAS standard; its 300 MB/s per phy is an older SAS generation.
- Linux limits in c2 are defaults and vary by driver.
- Fibre Channel and NVMe specifications were not consulted.
- Arithmetic: 32 x 32 = 1,024 commands; 8 x 300 = 2,400 MB/s; 128 x 128 = 16,384 ports.