All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: virtio-fs@redhat.com
Subject: Re: [Virtio-fs] Achieving parallelism in virtiofsd
Date: Mon, 8 Jul 2019 09:55:56 -0400	[thread overview]
Message-ID: <20190708135556.GA15498@redhat.com> (raw)
In-Reply-To: <20190704104650.GF1609@stefanha-x1.localdomain>

On Thu, Jul 04, 2019 at 11:46:50AM +0100, Stefan Hajnoczi wrote:
> Hi,
> Here are my plans for achieving parallelism in virtiofsd.  This will
> improve performance for workloads that keep more than one request in
> flight at a time.
> 
> Today virtiofsd performance is limited because it only processes 1
> request at a time.  This can be improved in two independent ways:
> parallel request processing and multiqueue.
> 
> Parallel request processing means working on more than one request at a
> time.  A request that blocks should not prevent the next request from
> executing.  The FUSE protocol is asynchronous so it's just a question of
> adjusting virtiofsd.
> 
> Multiqueue means providing several request virtqueues instead of just
> one.  This can be used with CPU and NUMA pinning so that request
> processing takes place on a core and NUMA node.  Better locality can
> result in higher performance.
> 
> virtiofsd needs to offer both of these features.  The model I'm
> proposing is one thread per virtqueue which distributes requests to a
> thread pool for execution.  Each virtqueue thread and its thread pool
> can be bound to a subset of CPUs.
> 
> Separate optimizations such as virtqueue polling could be added later to
> reduce latency.
> 
> I plan to use the glib thread pool, which offers the basic functionality
> that virtiofsd requires.  In the process of this work I will also audit
> and fix passthrough_ll.c's thread-safety.
> 
> Feedback is appreciated!

Hi Stefan,

I agree that virtiofsd needs to probably offer both the models. It
will be nice if we implement processing multiple parallel requests
on same queue now. And offer multiqueue support later (that will
require kernel changes as well).

/me is hoping that allowing processing multiple requests in parallel
will give us decent performance improvement, and also help solve the
issue of implementing *waiting* remote posix locks.

Thanks
Vivek


  parent reply	other threads:[~2019-07-08 13:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 10:46 [Virtio-fs] Achieving parallelism in virtiofsd Stefan Hajnoczi
2019-07-05  4:43 ` piaojun
2019-07-05  8:04   ` Stefan Hajnoczi
2019-07-05  8:14     ` Peng Tao
2019-07-05  9:56       ` Liu, Changpeng
2019-07-05  8:22     ` piaojun
2019-07-08 13:55 ` Vivek Goyal [this message]
2019-07-08 15:08 ` Dr. David Alan Gilbert
2019-07-09  8:15   ` Stefan Hajnoczi
2019-07-09  9:31     ` Miklos Szeredi

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=20190708135556.GA15498@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=stefanha@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 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.