linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Glanzmann <thomas@glanzmann.de>
To: Keith Busch <kbusch@kernel.org>
Cc: linux-nvme@lists.infradead.org
Subject: Re: Number of data and admin queues in use
Date: Tue, 15 Jul 2025 18:38:47 +0200	[thread overview]
Message-ID: <aHaEF3-GW8dXaOhe@glanzmann.de> (raw)
In-Reply-To: <aHZoBO9cPcRGIDwH@kbusch-mbp>

Hello Keith,

* Keith Busch <kbusch@kernel.org> [2025-07-15 16:39]:
> For PCI, the driver automatically handles the queue and interrupt setup,
> and cpu assignment.

> For TCP (and all fabrics transports), you have to specificy how many
> connections you want to make ("nr_io_queues=X") when you're setting up
> your initial fabrics connection.

> If you want to see what you've ended up with, you can consult the
> namespaces' sysfs entries:

> How many IO queues are there:

>   # ls -1 /sys/block/nvme0n1/mq/ | wc -l
>   64

> How large is each IO queue:

>   # cat /sys/block/nvme0n1/queue/nr_requests
>   1023

thank you for taking the time to answer me. I was looking multiple years for an
answer to this. nr_requests I stumbled on before, but /sys/block/nvme0n1/mq/
was new to me. The maximum that the NetApp appears to support is:

na2501::*> vserver nvme show-host-priority
Node                  Protocol  Priority I/O Queue Count I/O Queue Depth
--------------------- --------- -------- --------------- ---------------
na2501-01             fc-nvme
                                regular                4              32
                                high                   6              32
                      nvme-tcp
                                regular                2             128
                                high                   4             128
na2501-02             fc-nvme
                                regular                4              32
                                high                   6              32
                      nvme-tcp
                                regular                2             128
                                high                   4             128

(live) [~] ls -1 /sys/block/nvme0c0n1/mq/ | wc -l
4
(live) [~] ls -1 /sys/block/nvme0c1n1/mq/ | wc -l
4
(live) [~] cat /sys/block/nvme0c0n1/queue/nr_requests
127

With ext4 and fio I get:

fio --ioengine=libaio --refill_buffers --filesize=4G --ramp_time=2s --numjobs=40 --direct=1 --verify=0 --randrepeat=0 --group_reporting  --directory /mnt --name=4khqd --blocksize=4k --iodepth=50 --readwrite=write
  write: IOPS=159k, BW=620MiB/s (651MB/s)(159GiB/261872msec); 0 zone resets
fio --ioengine=libaio --refill_buffers --filesize=4G --ramp_time=2s --numjobs=40 --direct=1 --verify=0 --randrepeat=0 --group_reporting  --directory /mnt --name=4khqd --blocksize=4k --iodepth=50 --readwrite=read
  read: IOPS=449k, BW=1752MiB/s (1838MB/s)(157GiB/91645msec)

fio --ioengine=libaio --refill_buffers --filesize=4G --ramp_time=2s --numjobs=40 --direct=1 --verify=0 --randrepeat=0 --group_reporting  --directory /mnt --name=1mhqd --blocksize=1m --iodepth=50 --readwrite=write
  write: IOPS=1965, BW=1970MiB/s (2066MB/s)(157GiB/81434msec); 0 zone resets
fio --ioengine=libaio --refill_buffers --filesize=4G --ramp_time=2s --numjobs=40 --direct=1 --verify=0 --randrepeat=0 --group_reporting  --directory /mnt --name=1mhqd --blocksize=1m --iodepth=50 --readwrite=read
  read: IOPS=4034, BW=4044MiB/s (4241MB/s)(153GiB/38682msec)

Using 'iostat -xm 2' I can see that is utilizes the queue depth by watching aqu-sz.

Cheers,
	Thomas


  reply	other threads:[~2025-07-15 19:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15  1:58 Number of data and admin queues in use Thomas Glanzmann
2025-07-15 14:39 ` Keith Busch
2025-07-15 16:38   ` Thomas Glanzmann [this message]
2025-07-15 17:22   ` Chaitanya Kulkarni
2025-07-15 18:05     ` Thomas Glanzmann

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=aHaEF3-GW8dXaOhe@glanzmann.de \
    --to=thomas@glanzmann.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).