From: Mikulas Patocka <[email protected]>
To: Ming Lei <[email protected]>
Cc: Dave Chinner <[email protected]>,
Christoph Hellwig <[email protected]>,
Jens Axboe <[email protected]>, Jooyung Han <[email protected]>,
Alasdair Kergon <[email protected]>,
Mike Snitzer <[email protected]>,
Heinz Mauelshagen <[email protected]>,
[email protected], [email protected],
[email protected], [email protected],
[email protected]
Subject: Re: [PATCH] the dm-loop target
Date: Thu, 13 Mar 2025 17:36:53 +0100 (CET) [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <Z9FFTiuMC8WD6qMH@fedora>
On Wed, 12 Mar 2025, Ming Lei wrote:
> > > It isn't perfect, sometime it may be slower than running on io-wq
> > > directly.
> > >
> > > But is there any better way for covering everything?
> >
> > Yes - fix the loop queue workers.
>
> What you suggested is threaded aio by submitting IO concurrently from
> different task context, this way is not the most efficient one, otherwise
> modern language won't invent async/.await.
>
> In my test VM, by running Mikulas's fio script on loop/nvme by the attached
> threaded_aio patch:
>
> NOWAIT with MQ 4 : 70K iops(read), 70K iops(write), cpu util: 40%
> threaded_aio with MQ 4 : 64k iops(read), 64K iops(write), cpu util: 52%
> in tree loop(SQ) : 58K iops(read), 58K iops(write)
>
> Mikulas, please feel free to run your tests with threaded_aio:
>
> modprobe loop nr_hw_queues=4 threaded_aio=1
>
> by applying the attached the patch over the loop patchset.
>
> The performance gap could be more obvious in fast hardware.
With "threaded_aio=1":
Sync io
fio --direct=1 --bs=4k --runtime=10 --time_based --numjobs=12 --ioengine=psync --iodepth=1 --group_reporting=1 --filename=/mnt/test2/l -name=job --rw=rw
xfs/loop/xfs
READ: bw=300MiB/s (315MB/s), 300MiB/s-300MiB/s (315MB/s-315MB/s), io=3001MiB (3147MB), run=10001-10001msec
WRITE: bw=300MiB/s (315MB/s), 300MiB/s-300MiB/s (315MB/s-315MB/s), io=3004MiB (3149MB), run=10001-10001msec
Async io
fio --direct=1 --bs=4k --runtime=10 --time_based --numjobs=12 --ioengine=libaio --iodepth=16 --group_reporting=1 --filename=/mnt/test2/l -name=job --rw=rw
xfs/loop/xfs
READ: bw=869MiB/s (911MB/s), 869MiB/s-869MiB/s (911MB/s-911MB/s), io=8694MiB (9116MB), run=10002-10002msec
WRITE: bw=870MiB/s (913MB/s), 870MiB/s-870MiB/s (913MB/s-913MB/s), io=8706MiB (9129MB), run=10002-10002msec
Without "threaded_aio=1":
Sync io
fio --direct=1 --bs=4k --runtime=10 --time_based --numjobs=12 --ioengine=psync --iodepth=1 --group_reporting=1 --filename=/mnt/test2/l -name=job --rw=rw
xfs/loop/xfs
READ: bw=348MiB/s (365MB/s), 348MiB/s-348MiB/s (365MB/s-365MB/s), io=3481MiB (3650MB), run=10001-10001msec
WRITE: bw=348MiB/s (365MB/s), 348MiB/s-348MiB/s (365MB/s-365MB/s), io=3484MiB (3653MB), run=10001-10001msec
Async io
fio --direct=1 --bs=4k --runtime=10 --time_based --numjobs=12 --ioengine=libaio --iodepth=16 --group_reporting=1 --filename=/mnt/test2/l -name=job --rw=rw
xfs/loop/xfs
READ: bw=1186MiB/s (1244MB/s), 1186MiB/s-1186MiB/s (1244MB/s-1244MB/s), io=11.6GiB (12.4GB), run=10001-10001msec
WRITE: bw=1187MiB/s (1245MB/s), 1187MiB/s-1187MiB/s (1245MB/s-1245MB/s), io=11.6GiB (12.5GB), run=10001-10001msec
Mikulas
prev parent reply other threads:[~2025-03-13 16:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <[email protected]>
[not found] ` <[email protected]>
[not found] ` <[email protected]>
[not found] ` <[email protected]>
[not found] ` <[email protected]>
[not found] ` <[email protected]>
[not found] ` <[email protected]>
[not found] ` <Z8zbYOkwSaOJKD1z@fedora>
[not found] ` <[email protected]>
[not found] ` <[email protected]>
2025-03-11 10:43 ` [PATCH] the dm-loop target Ming Lei
2025-03-12 2:34 ` Dave Chinner
2025-03-12 6:24 ` Christoph Hellwig
2025-03-12 8:26 ` Ming Lei
2025-03-13 1:36 ` Ming Lei
2025-03-13 16:36 ` Mikulas Patocka [this message]
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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