All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Sitsofe Wheeler <sitsofe@gmail.com>
Cc: Erwan Velu <e.velu@criteo.com>,
	"fio@vger.kernel.org" <fio@vger.kernel.org>,
	Hans-Peter Lehmann <hans-peter.lehmann@kit.edu>
Subject: Re: Question: t/io_uring performance
Date: Wed, 8 Sep 2021 06:22:53 -0600	[thread overview]
Message-ID: <bfddf649-aaf4-b01f-f26b-513fb4e236b2@kernel.dk> (raw)
In-Reply-To: <CALjAwxgM65_vfrBkvGksoyO6vgR1dx4aPtGJSqRhm-gieHKgyA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3330 bytes --]

On 9/8/21 5:53 AM, Sitsofe Wheeler wrote:
> (CC'ing Jens directly in case he missed the previous messages)
> 
> On Mon, 6 Sept 2021 at 15:28, Hans-Peter Lehmann
> <hans-peter.lehmann@kit.edu> wrote:
>>
>> Hi Jens,
>>
>> not sure if you have read the emails in this thread - now trying to address you directly. Both Erwan and me are unable to reproduce your single-threaded IOPS measurements - we don't even get close to your numbers. The bottle-neck seems to be the CPU, not the SSDs. Did you use some special configuration for your benchmarks?
>>
>> Best regards
>> Hans-Peter
>>
>> (I have also reproduced the behavior with an Intel processor now - the single-threaded throughput is also capped at around 580k IOPS, even though the SSDs can handle more than that when using multiple threads)

Thanks for CC'ing me, I don't always see the messages otherwise. 580K is
very low, but without having access to the system and being able to run
some basic profiling, hard for me to say what you're running into. I may
miss some details in the below, so please do ask followups if things are
missing/unclear.

1) I'm using a 3970X with a desktop board + box for my peak testing,
   specs on that can be found online.

2) Yes I do run a custom configuration on my kernel, I do kernel
   development after all :-). I'm attaching the one I'm using. This
   hasn't changed in a long time. I do turn off various things that I
   don't need and some of them do impact performance.

3) The options I run t/io_uring with have been posted multiple times,
   it's this one:

   taskset -c 0  t/io_uring -b512 -d128 -c32 -s32 -p1 -F1 -B1 /dev/nvme3n1

   which is QD=128, 32/32 submit/complete batching, polled IO,
   registered files and buffers. Note that you'll need to configure NVMe
   to properly use polling. I use 32 poll queues, number isn't really
   that important for single core testing, as long as there's enough to
   have a poll queue local to CPU being tested on. You'll see this in
   dmesg:

   nvme nvme3: 64/0/32 default/read/poll queues

4) Make sure your nvme device is using 'none' as the IO scheduler. I
   think this is a no-brainer, but mentioning it just in case.

5) I turn off iostats and merging for the device. iostats is the most
   important, depending on the platform getting accurate time stamps can
   be expensive:

   echo 0 > /sys/block/nvme3n1/queue/iostats
   echo 2 > /sys/block/nvme3n1/queue/nomerges

6) I do no special CPU frequency tuning. It's running stock settings,
   and the system is not overclocked or anything like that.

I think that's about it. The above gets me 3.5M+ per core using polled
IO and the current kernel, and around 2.3M per core if using IRQ driven
IO. Note that the current kernel is important here, we've improved
things a lot over the last year.

That said, 580K is crazy low, and I bet there's something basic that's
preventing it running faster. Is this a gen2 optane? One thing that
might be useful is to run my t/io_uring from above, it'll tell you what
the IO thread pid is:

[...]
submitter=2900332
[...]

and then run

# perf record -g -p 2900332 -- sleep 3

and afterwards do:

# perf report -g --no-children > output

and gzip the output and attach it here. With performance that low,
should be pretty trivial to figure out what is going on here.

-- 
Jens Axboe


[-- Attachment #2: amd-config.txt.gz --]
[-- Type: application/gzip, Size: 31774 bytes --]

  reply	other threads:[~2021-09-08 12:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 15:57 Question: t/io_uring performance Hans-Peter Lehmann
2021-08-26  7:27 ` Erwan Velu
2021-08-26 15:57   ` Hans-Peter Lehmann
2021-08-27  7:20     ` Erwan Velu
2021-09-01 10:36       ` Hans-Peter Lehmann
2021-09-01 13:17         ` Erwan Velu
2021-09-01 14:02           ` Hans-Peter Lehmann
2021-09-01 14:05             ` Erwan Velu
2021-09-01 14:17               ` Erwan Velu
2021-09-06 14:26                 ` Hans-Peter Lehmann
2021-09-06 14:41                   ` Erwan Velu
2021-09-08 11:53                   ` Sitsofe Wheeler
2021-09-08 12:22                     ` Jens Axboe [this message]
2021-09-08 12:41                       ` Jens Axboe
2021-09-08 16:12                         ` Hans-Peter Lehmann
2021-09-08 16:20                           ` Jens Axboe
2021-09-08 21:24                             ` Hans-Peter Lehmann
2021-09-08 21:34                               ` Jens Axboe
2021-09-10 11:25                                 ` Hans-Peter Lehmann
2021-09-10 11:45                                   ` Erwan Velu
2021-09-08 12:33                 ` Jens Axboe
2021-09-08 17:11                   ` Erwan Velu
2021-09-08 22:37                     ` Erwan Velu
2021-09-16 21:18                       ` Erwan Velu
2021-09-21  7:05                         ` Erwan Velu
2021-09-22 14:45                           ` Hans-Peter Lehmann

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=bfddf649-aaf4-b01f-f26b-513fb4e236b2@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=e.velu@criteo.com \
    --cc=fio@vger.kernel.org \
    --cc=hans-peter.lehmann@kit.edu \
    --cc=sitsofe@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.