Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Hamilton Tobon Mosquera <htobonm@eafit.edu.co>, fio@vger.kernel.org
Subject: Re: [io_uring] Problems using io_uring engine
Date: Mon, 25 May 2020 18:19:40 -0600	[thread overview]
Message-ID: <93136695-8e24-c48c-0a74-e242bdaa2f3b@kernel.dk> (raw)
In-Reply-To: <ed949243-f657-5f41-79f2-dc8a34459f27@eafit.edu.co>

On 5/25/20 4:38 PM, Hamilton Tobon Mosquera wrote:
> Thank you for your answer.
> 
> I'm using ext4. I guess it supports polling because I could get sub 10 
> microseconds latency with an Intel Optane SSDPED1D280GA 260GB and 
> pvsync2. If it helps here's how I'm running it:
> 
> fio global.fio --size=50G --ioengine=io_uring --hipri --direct=1 
> --rw=randwrite --iodepth=256 --bs=4K --numjobs=4 --offset_increment=25%
> 
> The global.fio has:
> 
> ioengine=io_uring
> hipri
> direct=1
> thread=1
> buffered=0
> size=100%
> randrepeat=0
> time_based
> ramp_time=0
> norandommap
> refill_buffers
> log_max_value=1
> log_avg_msec=1000
> group_reporting
> percentile_list=50:60:70:80:90:95:99
> 
> Your help is highly appreciated, thank you.

I almost guarantee you that you are NOT using polling. Check with
vmstat 1 and look at the interrupt rate. If it's about your IOPS
rate, then you're doing IRQ based completions. If it's closer to 0,
you're doing polled.

If your fs supports it, then you likely did not allocate poll
queues for NVMe. If nvme is builtin to the kernel, use nvme.poll_queues=N
to allocate N poll queues, or use poll_queues=N as a module parameter
if nvme is modular.

Ideally you want N to be equal to the number of CPUs in the system.
NVMe will report that it used at load time, here's an example from
my laptop:

[    2.396978] nvme nvme0: 1/8/8 default/read/poll queues

You can check this right now by looking at dmesg. If you don't
have any poll queues, preadv2 with IOCB_HIPRI will be IRQ based,
not polled. io_uring just tells you this up front with -EOPNOTSUPP.

-- 
Jens Axboe



  reply	other threads:[~2020-05-26  0:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 17:45 [io_uring] Problems using io_uring engine Hamilton Tobon Mosquera
2020-05-25 19:21 ` Jens Axboe
2020-05-25 22:38   ` Hamilton Tobon Mosquera
2020-05-26  0:19     ` Jens Axboe [this message]
2020-05-26  4:17     ` Jens Axboe
2020-05-26 13:57       ` Hamilton Tobon Mosquera
2020-05-26 19:18         ` Jens Axboe
2020-05-26 20:21           ` Hamilton Tobon Mosquera
2020-05-26 20:26             ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93136695-8e24-c48c-0a74-e242bdaa2f3b@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=htobonm@eafit.edu.co \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox