From: Ming Lei <ming.lei@redhat.com>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org
Subject: Re: [PATCH 0/2] New zoned loop block device driver
Date: Fri, 24 Jan 2025 20:30:03 +0800 [thread overview]
Message-ID: <Z5OHy76X2F9H6EWP@fedora> (raw)
In-Reply-To: <d5e59531-c19b-4332-8f47-b380ab9678be@kernel.org>
On Fri, Jan 24, 2025 at 06:30:19PM +0900, Damien Le Moal wrote:
> On 1/10/25 21:34, Ming Lei wrote:
> >> It is easy to extend rublk/zoned in this way with io_uring io emulation, :-)
> >
> > Here it is:
> >
> > https://github.com/ublk-org/rublk/commits/file-backed-zoned/
> >
> > Top two commits implement the feature by command line `--path $zdir`:
> >
> > [rublk]# git diff --stat=80 HEAD^^...
> > src/zoned.rs | 397 +++++++++++++++++++++++++++++++++++++++++++++++----------
> > tests/basic.rs | 49 ++++---
> > 2 files changed, 363 insertions(+), 83 deletions(-)
> >
> > It takes 280 new LoC:
> >
> > - support both ram-back and file-back
> > - completely async io_uring IO emulation for zoned read/write IO
> > - include selftest code for running mkfs.btrfs/mount/read & write IO/umount
>
> Hi Ming,
>
> My apologies for the late reply. Conference travel kept me busy.
> Thank you for doing this. I gave it a try and measured the performance for some
> write workloads (using current Linus tree which includes the block PR for 6.14).
> The zloop results shown here are with a slightly tweaked version (not posted)
> that changes to using a work item per command instead of having a single work
> for all commands.
>
> 1 queue:
> ========
> +-------------------+-------------------+
> | ublk (IOPS / BW) | zloop (IOPS / BW) |
> +----------------------------+-------------------+-------------------+
> | QD=1, 4K rnd wr, 1 job | 11.7k / 47.8 MB/s | 15.8k / 53.0 MB/s |
> | QD=32, 4K rnd wr, 8 jobs | 63.4k / 260 MB/s | 101k / 413 MB/s |
I can't reproduce the above two, actually not observe obvious difference
between rublk/zoned and zloop in my test VM.
Maybe rublk works at debug mode, which reduces perf by half usually.
And you need to add device via 'cargo run -r -- add zoned' for using
release mode.
Actually there is just single io_uring_enter() running in each ublk queue
pthread, perf should be similar with kernel IO handling, and the main extra
load is from the single syscall kernel/user context switch and IO data copy,
and data copy effect can be neglected in small io size usually(< 64KB).
> | QD=32, 128K rnd wr, 1 job | 5008 / 656 MB/s | 5993 / 786 MB/s |
> | QD=32, 128K seq wr, 1 job | 2636 / 346 MB/s | 5393 / 707 MB/s |
ublk 128K BS may be a little slower since there is one extra copy.
> +----------------------------+-------------------+-------------------+
>
> 8 queues:
> =========
> +-------------------+-------------------+
> | ublk (IOPS / BW) | zloop (IOPS / BW) |
> +----------------------------+-------------------+-------------------+
> | QD=1, 4K rnd wr, 1 job | 9699 / 39.7 MB/s | 16.7k / 68.6 MB/s |
> | QD=32, 4K rnd wr, 8 jobs | 58.2k / 238 MB/s | 108k / 444 MB/s |
> | QD=32, 128K rnd wr, 1 job | 4160 / 545 MB/s | 5715 / 749 MB/s |
> | QD=32, 128K seq wr, 1 job | 3274 / 429 MB/s | 5934 / 778 MB/s |
> +----------------------------+-------------------+-------------------+
>
> As you can see, zloop is generally much faster. This shows the best results from
> several runs as performance variation from one run to another can be significant
> (for both ublk and zloop).
>
> But as mentioned before, since this is intended to be a test tool for file
> systems, performance is not the primary goal here (though the higher the better
> as that shortens test times). Simplicity is. And as Ted also stated, introducing
> a ublk and rust dependency in xfstests is far from ideal.
Simplicity need to be observed from multiple dimensions, 300 vs. 1500 LoC has
shown something already, IMO.
Thanks,
Ming
next prev parent reply other threads:[~2025-01-24 12:30 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 14:24 [PATCH 0/2] New zoned loop block device driver Damien Le Moal
2025-01-06 14:24 ` [PATCH 1/2] block: new " Damien Le Moal
2025-01-06 14:24 ` [PATCH 2/2] Documentation: Document the " Damien Le Moal
2025-01-06 14:54 ` [PATCH 0/2] New " Jens Axboe
2025-01-06 15:21 ` Christoph Hellwig
2025-01-06 15:24 ` Jens Axboe
2025-01-06 15:32 ` Christoph Hellwig
2025-01-06 15:38 ` Jens Axboe
2025-01-06 15:44 ` Christoph Hellwig
2025-01-06 17:38 ` Jens Axboe
2025-01-06 18:05 ` Christoph Hellwig
2025-01-07 21:10 ` Jens Axboe
2025-01-08 5:49 ` Christoph Hellwig
2025-01-07 1:08 ` Damien Le Moal
2025-01-07 21:08 ` Jens Axboe
2025-01-08 5:11 ` Damien Le Moal
2025-01-08 5:44 ` Christoph Hellwig
2025-01-08 2:47 ` Ming Lei
2025-01-08 14:10 ` Theodore Ts'o
2025-01-08 2:29 ` Ming Lei
2025-01-08 5:06 ` Damien Le Moal
2025-01-08 8:13 ` Ming Lei
2025-01-08 9:09 ` Christoph Hellwig
2025-01-08 9:39 ` Ming Lei
2025-01-10 12:34 ` Ming Lei
2025-01-24 9:30 ` Damien Le Moal
2025-01-24 12:30 ` Ming Lei [this message]
2025-01-24 14:20 ` Johannes Thumshirn
2025-01-29 8:10 ` Damien Le Moal
2025-01-31 3:54 ` Ming Lei
2025-02-04 3:22 ` Damien Le Moal
2025-02-05 3:43 ` Ming Lei
2025-02-05 6:07 ` Damien Le Moal
2025-02-06 3:24 ` Ming Lei
2025-01-08 5:47 ` Christoph Hellwig
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=Z5OHy76X2F9H6EWP@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.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).