From: Stefan Hajnoczi <stefanha@redhat.com>
To: Chirantan Ekbote <chirantan@chromium.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
Vivek Goyal <vgoyal@redhat.com>,
linux-fsdevel@vger.kernel.org, virtio-fs@redhat.com,
Dylan Reid <dgreid@chromium.org>,
Suleiman Souhlal <suleiman@chromium.org>,
slp@redhat.com
Subject: Re: [PATCH 2/2] fuse: virtiofs: Add basic multiqueue support
Date: Fri, 1 May 2020 16:47:52 +0100 [thread overview]
Message-ID: <20200501154752.GA222606@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAJFHJrr2DAgQC9ZWx78OudX1x6A57_vpLf4rJu80ceR6bnpbaQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2535 bytes --]
On Fri, May 01, 2020 at 04:14:38PM +0900, Chirantan Ekbote wrote:
> On Tue, Apr 28, 2020 at 12:20 AM Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > On Fri, Apr 24, 2020 at 03:25:40PM +0900, Chirantan Ekbote wrote:
> > Even if you don't care about SMP performance, using multiqueue as a
> > workaround for missing request parallelism still won't yield the best
> > results. The guest should be able to submit up to the maximum queue
> > depth of the physical storage device. Many Linux block drivers have max
> > queue depths of 64. This would require 64 virtqueues (plus the queue
> > selection algorithm would have to utilize each one) and shows how
> > wasteful this approach is.
> >
>
> I understand this but in practice unlike the virtio-blk workload,
> which is nothing but reads and writes to a single file, the virtio-fs
> workload tends to mix a bunch of metadata operations with data
> transfers. The metadata operations should be mostly handled out of
> the host's file cache so it's unlikely virtio-fs would really be able
> to fully utilize the underlying storage short of reading or writing a
> really huge file.
I agree that a proportion of heavy I/O workloads on virtio-blk become
heavy metadata I/O workloads on virtio-fs.
However, workloads consisting mostly of READ, WRITE, and FLUSH
operations still exist on virtio-fs. Databases, audio/video file
streaming, etc are bottlenecked on I/O performance. They need to
perform well and virtio-fs should strive to do that.
> > Instead of modifying the guest driver, please implement request
> > parallelism in your device implementation.
>
> Yes, we have tried this already [1][2]. As I mentioned above, having
> additional threads in the server actually made performance worse. My
> theory is that when the device only has 2 cpus, having additional
> threads on the host that need cpu time ends up taking time away from
> the guest vcpu. We're now looking at switching to io_uring so that we
> can submit multiple requests from a single thread.
The host has 2 CPUs? How many vCPUs does the guest have? What is the
physical storage device? What is the host file system?
io_uring's vocabulary is expanding. It can now do openat2(2), close(2),
statx(2), but not mkdir(2), unlink(2), rename(2), etc.
I guess there are two options:
1. Fall back to threads for FUSE operations that cannot yet be done via
io_uring.
2. Process FUSE operations that cannot be done via io_uring
synchronously.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-05-01 15:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 6:25 [PATCH 1/2] fuse: virtiofs: Fix nullptr dereference Chirantan Ekbote
2020-04-24 6:25 ` [PATCH 2/2] fuse: virtiofs: Add basic multiqueue support Chirantan Ekbote
2020-04-27 15:19 ` Stefan Hajnoczi
2020-04-27 15:22 ` Stefan Hajnoczi
2020-05-01 7:14 ` Chirantan Ekbote
2020-05-01 15:47 ` Stefan Hajnoczi [this message]
2020-05-07 8:10 ` Chirantan Ekbote
2020-06-02 9:29 ` Stefan Hajnoczi
2020-04-27 14:38 ` [PATCH 1/2] fuse: virtiofs: Fix nullptr dereference Stefan Hajnoczi
2020-04-27 17:58 ` Vivek Goyal
2020-04-28 8:53 ` Stefan Hajnoczi
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=20200501154752.GA222606@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=chirantan@chromium.org \
--cc=dgreid@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=slp@redhat.com \
--cc=suleiman@chromium.org \
--cc=vgoyal@redhat.com \
--cc=virtio-fs@redhat.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 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).