Re: [PATCH 4/4] nvme: add support for mq_ops->queue_rqs()

Jens Axboe
2021-12-20T14:26:00Z

On 12/20/21 7:19 AM, Jens Axboe wrote:
>>> develop NVMe/RDMA queue_rqs code and test the perf with it.
>>> You should just be able to use iodepth_batch with fio. For my peak
>>> testing, I use t/io_uring from the fio repo. By default, it'll run QD of
>>> and do batches of 32 for complete and submit. You can just run:
>>>
>>> t/io_uring <dev or file>
>>>
>>> maybe adding -p0 for IRQ driven rather than polled IO.
>>
>> I used your block/for-next branch and implemented queue_rqs in NVMe/RDMA
>> but it was never called using the t/io_uring test nor fio with
>> iodepth_batch=32 flag with io_uring engine.
>>
>> Any idea what might be the issue ?
>>
>> I installed fio from sources..
>
> The two main restrictions right now are a scheduler and shared tags, are
> you using any of those?

Here's a sample run, which is 2 threads, each driving 2 devices and
using 31 (-s31) batch submit count, with 16 batch completions (-c16).
Block size is 512b. Ignore most other options, they don't really matter,
the defaults are 128 QD, 32 submit batch, 32 complete batch.

$ sudo taskset -c 10,11 t/io_uring -d256 -b512 -s31 -c16 -p1 -F1 -B1 -n2 /dev/nvme0n1 /dev/nvme3n1 /dev/nvme2n1 /dev/nvme4n1
Added file /dev/nvme0n1 (submitter 0)
Added file /dev/nvme3n1 (submitter 1)
Added file /dev/nvme2n1 (submitter 0)
Added file /dev/nvme4n1 (submitter 1)
polled=1, fixedbufs=1/1, register_files=1, buffered=0, QD=256
Engine=io_uring, sq_ring=256, cq_ring=256
submitter=0, tid=91490
submitter=1, tid=91491
IOPS=13038K, BW=6366MiB/s, IOS/call=30/30, inflight=(128 5 120 128)
IOPS=13042K, BW=6368MiB/s, IOS/call=30/30, inflight=(128 96 128 15)
IOPS=13049K, BW=6371MiB/s, IOS/call=30/30, inflight=(128 122 120 128)
IOPS=13045K, BW=6369MiB/s, IOS/call=30/30, inflight=(110 128 99 128)

That's driving 13M IOPS, using a single CPU core (10/11 are thread
siblings). Top of profile for that:

+ 6.41% io_uring [kernel.vmlinux] [k] __blk_mq_alloc_requests
+ 5.46% io_uring [kernel.vmlinux] [k] blkdev_direct_IO.part.0
+ 5.36% io_uring [kernel.vmlinux] [k] blk_mq_end_request_batch
+ 5.24% io_uring io_uring [.] submitter_uring_fn
+ 5.18% io_uring [kernel.vmlinux] [k] io_submit_sqes
+ 5.12% io_uring [kernel.vmlinux] [k] bio_alloc_kiocb
+ 4.75% io_uring [nvme] [k] nvme_poll
+ 4.67% io_uring [kernel.vmlinux] [k] __io_import_iovec
+ 4.58% io_uring [nvme] [k] nvme_queue_rqs
+ 4.49% io_uring [kernel.vmlinux] [k] blk_mq_submit_bio
+ 4.32% io_uring [nvme] [k] nvme_map_data
+ 3.02% io_uring [kernel.vmlinux] [k] io_issue_sqe
+ 2.89% io_uring [nvme_core] [k] nvme_setup_cmd
+ 2.60% io_uring [kernel.vmlinux] [k] io_prep_rw
+ 2.59% io_uring [kernel.vmlinux] [k] submit_bio_noacct.part.0

--
Jens Axboe