The first chart I drew from this project was a flat line. We had 8 Gen5 M.2 drives running 4K random reads at 6.5 million IOPS. We went to 16 drives and got 6.5 million. At 24 drives, 6.5 million again. At 32 drives across two cards, it was still about 6.5 million.

When adding drives changes nothing, something other than the drives sets the limit. This post follows that line and the three that came after it, and names what owned each one.

The setup was two Apex X16 Gen5 cards, each in its own PCIe Gen5 x16 slot, holding 32 consumer Gen5 M.2 drives between them. The drives were Sabrent Rocket 5 4 TB units with Phison E26 controllers and Samsung 9100 PROs. We ran everything in two workstations, an HP Z8 Fury G5 with a 20-core Xeon w7-3445 and an ASUS Pro WS TRX50-SAGE with a 24-core Threadripper 7960X. Both ran Debian with kernel 6.12 and fio. Each host got a campaign of 800 benchmark cells, and the final runs had zero rejected cells.

Ceiling one: the interrupt path on the Xeon

A flat line from 8 drives to 32 rules out the drives. It also rules out the cards, because the same cards carried almost four times as much once the host's interrupt path was out of the way, as the next table shows. That leaves the host.

To split the host into parts, we ran the Linux block layer with no storage under it at all. It carried 19 million IOPS on the same Xeon. The kernel's I/O stack had about three times the headroom we were using, so the stack itself was not the first limit.

The stock Linux NVMe driver completes each I/O with an interrupt. The drive raises it, a CPU core takes it, and the kernel wakes the waiting thread. On this host that path topped out at 6.5 million completions a second. To test that, we switched to t/io_uring, the io_uring test tool that ships with fio, in polled mode, where the submitting threads check the completion queues themselves and no interrupt fires.

Drives Polled 4K random read, Xeon
8 9.0 million IOPS
16 18.0 million IOPS
24 22.7 million IOPS
32 25.0 million IOPS

The same drives, cards and host kept scaling with drive count once interrupts left the path. With the stock driver, the owner of ceiling one was the interrupt completion path.

Ceiling two: the faster host, and a security setting

We moved both cards and all 32 drives to the Threadripper. With the same stock interrupt-driven driver, 4K random reads reached 13.3 million IOPS, about twice the Xeon's figure. Raw 4K random writes reached 12.6 million.

The AMD host also exposed a kernel setting that halves per-thread I/O when left at its default. Linux mitigates the speculative return stack overflow vulnerability, SRSO, on AMD Zen 1 to Zen 4 processors by default. On our Threadripper the default mode was Safe RET, which makes the CPU mispredict every return in the kernel through a safe return sequence. We ran an A/B on a null block device, which measures the kernel with no drive in the way. With the mitigation on, one thread carried 381 thousand IOPS. With spec_rstack_overflow=off on the kernel command line, the same thread carried 758 thousand.

That is a security trade-off. Turning the mitigation off reopens a known side-channel vulnerability. On a single-tenant storage box with no untrusted code, some teams will accept that. On a shared host or anything that runs other people's workloads, leave it on and buy throughput with more threads.

We ran the Threadripper campaign with the mitigation off, and every Threadripper figure in this post, including the 13.3 million above, carries that condition. With the default setting, expect the interrupt-driven numbers to come in lower.

If you are sizing a build like this now, request a multi-unit quote and tell us which host CPU you plan to use. Ceilings one and two show that the CPU sets the small-block result before the storage does.

Ceiling three: memory bandwidth on the Xeon

Sequential reads hit a different wall. On the Xeon, 32 drives stopped at 97 to 100 GB/s. We ran STREAM on the same host and measured 92 GB/s for copy and 98 GB/s for triad. That workstation had memory in only four of its eight channels, and every byte fio reads lands in RAM. The storage reached the memory system's limit.

The same 32 drives reached 114 GB/s on the Threadripper, even though its STREAM copy figure was lower, at 80 GB/s. DMA into a read buffer does not pay for a copy, so on that host memory was not the bound. The 114 GB/s works out to about 57 GB/s per slot, in line with the 56 GB/s read bandwidth on the X16 Gen5 product page.

This is why density and slot bandwidth matter together. Sixteen drives on one card give you about 56 GB/s from one x16 slot. Two cards in two slots get you past 100 GB/s with slots to spare on a workstation board. On the Xeon, the host's memory system ran out before the slots or drives did.

Ceiling four: the uplinks themselves

With polling on the Threadripper, 4K random reads reached 25.6 to 25.9 million IOPS at 24 to 48 threads. Doubling the threads from 24 to 48 moved the result by less than 2 percent. The CPU was no longer the limit.

The 32 drives on their own add up to about 49 million 4K IOPS, so they were not the limit either. The limit was the two Gen5 x16 links between the cards and the host. At 4 KiB per I/O, about 25.6 million is all the data two of those links carry.

To confirm it, we dropped the I/O size to 512 bytes. Each I/O moves one eighth of the data, so if the cap were a count of I/Os, the result would stay near 26 million. The same drives reached about 47 million IOPS instead. The 4K line is a data limit.

At this point the answer stops being a tuning parameter. Two x16 slots carry about 25.6 million 4K reads. For more, you add cards in more slots. Adding drives behind the same two links will not raise that number.

What to check on your own host today

We discarded seven baselines before we trusted the numbers above. In one, the CPU governor sat on powersave and the host ran at 22 percent of its clock. In another, an nvme.poll_queues setting left every drive of one model with a single interrupt queue for 40 CPUs. Here is the list we built from them.

Check the NVMe queue split. If you set nvme.poll_queues, poll queues come off the top of whatever each drive grants. A drive that grants few queues can end up with one interrupt queue for every CPU. In our case each drive of one model got one usable queue while the other model, which grants far more queues, kept 56. Check the split per controller:

dmesg | grep 'default/read/poll queues'

Check the CPU governor before every run. A powersave governor cost us a full run.

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | sort | uniq -c

Decide on the IOMMU. Our Debian kernel had Intel VT-d on by default. Booting with intel_iommu=off gave +13 percent on 4K reads and +33 to +48 percent on sequential reads on the Xeon. If you need device isolation or pass-through, keep it on and accept the cost.

Weigh the SRSO mitigation on AMD. spec_rstack_overflow=off doubled per-thread kernel I/O in our A/B. Treat it as the security decision it is.

Set the RAID strip size on purpose. On a hardware RAID 0 volume, moving from the card's 128 KiB default strip to 16 KiB took 4K writes from 3.8 million to 7.08 million IOPS.

Budget for the filesystem. Where there was headroom, ext4 or XFS cost about 20 percent of 4K reads compared with the raw block device.

Precondition before you measure reads. Unwritten flash reads faster than written flash on some drives and slower on others. Fill the drives first, or your read numbers describe empty drives.

Put airflow across the cards. Gen5 M.2 drives need directed airflow at sustained load. Repositioning the chassis fans dropped the hottest drive in the same test from 80 to 51 degrees C. Which slots run hot depends on the chassis, so read every drive's temperature.

Where this leaves a build

In a two-slot workstation, 32 Gen5 drives on two Apex X16 Gen5 cards took us to 114 GB/s sequential and about 25.6 million 4K random reads. Every ceiling below that belonged to the host. The interrupt path and, on the Xeon, memory bandwidth each capped a result before the storage did, and the SRSO mitigation halves what each kernel thread can push. The drives, cards and plain NVMe driver did not need anything special. Past 25.6 million, plan on more cards in more slots.

Request Multi-Unit Quote · Apex X16 Gen5 product page

Related: