Bookmarks

PCIe — PCI Express bus

A serial bus over which the processor communicates with expansion cards and devices: graphics cards, NVMe drives, network and compute accelerators.

Also: PCI-E, PCIe 4.0, PCIe 5.0

checked 9 Nov

All terms

PCI Express replaced the parallel PCI bus in 2003 and has remained the main way to connect a device to a motherboard ever since. A connection is built up from lanes, and each generation of the standard doubles the speed of a single lane. The standard is maintained by the PCI-SIG consortium.

Generations and speed

GenerationYearLane speedx16 bandwidth, one direction
3.020108 GT/s≈16 GB/s
4.0201716 GT/s≈32 GB/s
5.0201932 GT/s≈63 GB/s
6.0202264 GT/s (PAM4)up to 128 GB/s
7.02025128 GT/s (PAM4)up to 256 GB/s

Lane speed is measured in gigatransfers per second (GT/s) — the number of transfers on a lane per second, including the service bits of the encoding. Generations 1.0 and 2.0 used 8b/10b encoding, from 3.0 onwards 128b/130b, and generation 6.0 moved to four-level PAM4 modulation and the FLIT block frame format.

Lanes and configurations

Each lane is two differential pairs, one for receiving and one for transmitting, and works in duplex. Lanes are combined: x1 for slower devices, x4 for NVMe, x16 for graphics cards and accelerators. A device can run on fewer lanes than the slot has: an x16 card on eight lanes gets half the bandwidth. Connectors of different widths differ in length and pin count, and a card of a smaller width can be fitted into a longer slot.

Example: an NVMe drive on x4 lanes of generation 4.0 delivers up to ≈8 GB/s; the same drive in a generation 3.0 slot delivers half as much. When lanes run short, a PCIe switch is added: it multiplies one processor port into several slots.

How to check in a server

consoleSpeed and width of the current link state
lspci -vv -s 01:00.0 | grep LnkStaLnkSta: Speed 32GT/s (ok), Width x16 (ok)

The lspci utility shows the negotiated speed and width: if an x16 card is sitting on eight lanes, you can see it straight away. For NVIDIA graphics cards, nvidia-smi -q prints the same. Lower-than-expected values are a common cause of slow GPUs and drives.

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • NVMeNVMe protocol

    NVMe is a command protocol for SSDs, while PCIe is the bus such an SSD connects to; the similar names cover different layers.

  • NVLink

    NVLink connects GPUs directly to one another and provides many times the bandwidth of PCIe, which is why training clusters are built on it rather than on PCIe.

In depth in the references

where the topic is covered in detail