News for hackers. Stuff that matters.
Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by Aissen on Monday October 18, 2021 @08:34AM (#28904729)
That's 125 ns per IO, on a single CPU core, with two devices. Mind boggling.
Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by devit on Monday October 18, 2021 @10:25AM (#28905721)
At around 4 GHz and 2 IPC, it's about 1000 CPU instructions per I/O.

Assuming you have an hardware DMA ring buffer for I/O that is directly mapped in userspace, the only thing that is really needed is to write the operation type, size, disk position and memory position to the ring buffer, update the buffer position and check for flush, doable in around 8 CISC instructions (plus the slowpath), so around 100x inefficient.

Without the direct mapped ring buffer and with a filesystem, you need a kernel to translate from uring to the hardware ring buffer, and here it still seems around 10x inefficient as around 100 instructions should be enough to do the translation (assuming pages already mapped in the IOMMU, that you have the file block map in cache, and that the whole system is architected to maximize the efficiency of this operation).

Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by throwawaylinux on Monday October 18, 2021 @11:43PM (#28914622)
> Assuming you have an hardware DMA ring buffer for I/O that is directly mapped in userspace, the only thing that is really needed is to write the operation type, size, disk position and memory position to the ring buffer, update the buffer position and check for flush, doable in around 8 CISC instructions (plus the slowpath), so around 100x inefficient.

This type of thing is not measured in instructions anymore, it's measured in off-board operations and latencies. Cache misses, latencies to poke MMIO and get back interrupts if necessary, DMA transfer to complete, device access time. In this case it seems the hardware is theoretically capable of about 12M so the core mostly be just waiting for that.

Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by Flow on Tuesday October 19, 2021 @02:26AM (#28915381)
Will DMA from external devices pass L3 or some other CPU cache? Or are all accesses to the freshy DMAed-to memory be cold
Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by anarazel on Monday October 18, 2021 @11:43AM (#28906672)
It's worth noting that there's some batching involved, so it's not 125ns for processing one io, then again 125ns for the next. Both combining some of the work, and superscalar execution is necessary to reach this high numbers...
Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by benlwalker on Monday October 18, 2021 @12:43PM (#28907554)
To expand on the batching details, I haven't seen exactly what he's doing here, but historically the numbers quoted are from benchmarks that submit something like 128 total queue depth in alternating batches of 64. The disks hit max performance with a much lower queue depth than 64. So it's very unrealistic perfect batching that you'll never see in a real application. The workload is only a useful tool for optimizing the code, which is exactly what he's using it for.
Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by wtallis on Monday October 18, 2021 @12:54PM (#28907684)
The Intel Optane drives he's testing with hit max performance at pretty low queue depths, but flash-based SSDs with similar throughput will require those high queue depths.
Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by anarazel on Monday October 18, 2021 @02:11PM (#28908948)
I think you need batching for the nvme doorbell alone at anything close to these kinds of rates...

For some workloads it's not that hard to have that deep queues. What's harder is to know when to use them and when not. There's really not enough information available to make any of this self-tuning.

Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by guerrilla on Monday October 18, 2021 @08:53AM (#28904889)
Faster than DRAM from the 90's.
Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by formerly_proven on Monday October 18, 2021 @09:07AM (#28905030)
The access time has actually not changed a lot, it's just that transferring the smallest read a contemporary processor would issue - one cache line (~64 bytes) - at somewhere between 500-1000 MB/s takes around 100 ns already. That transfer-related latency has been reduced drastically.
Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by guerrilla on Monday October 18, 2021 @09:40AM (#28905327)
Didn't /RAS timing drop from like 120ns to 10ns too? That's what I was thinking about. Then DDR, and that bus size is also 16 times wider.
Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by formerly_proven on Tuesday October 19, 2021 @06:14AM (#28916575)
Wasn't tRAS always around 2-3x tCL?
Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by terafo on Monday October 18, 2021 @04:06PM (#28910905)
Modern SSDs generally have more bandwidth than DDR2.
Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by spicybright on Monday October 18, 2021 @07:15PM (#28913036)
I'd hope so lol
Re:Axboe Achieves 8M IOPS Per-Core with Newest Linux Optimiz... by megous on Monday October 18, 2021 @08:46AM (#28904832)
IO is 512B sectors here? Or 4KiB?

EDIT: 512, looking at the screenshot..