mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] fuse: optimize scatter-gather direct IO
@ 2012-07-20 11:50 Maxim Patlasov
  2012-07-20 11:50 ` [PATCH 1/4] fuse: add basic support of iovec[] to fuse_req Maxim Patlasov
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Maxim Patlasov @ 2012-07-20 11:50 UTC (permalink / raw)
  To: miklos; +Cc: fuse-devel, linux-kernel, devel

Hi,

Existing fuse implementation processes scatter-gather direct IO in suboptimal
way: fuse_direct_IO passes iovec[] to fuse_loop_dio and the latter calls
fuse_direct_read/write for each iovec from iovec[] array. Thus we have as many
submitted fuse-requests as the number of elements in iovec[] array. This is
pure waste of resources and affects performance negatively especially for the
case of many small chunks (e.g. page-size) packed in one iovec[] array.

The patch-set amends situation in a natural way: let's simply pack as
many iovec[] segments to every fuse-request as possible.

To estimate performance improvement I used slightly modified fusexmp over
tmpfs (clearing O_DIRECT bit from fi->flags in xmp_open). The test opened
a file with O_DIRECT, then called readv/writev in a loop. An iovec[] for
readv/writev consisted of 32 segments of 4K each. The throughput on some
commodity (rather feeble) server was (in MB/sec):

        original / patched
writev: ~107     / ~480
readv:  ~114     / ~569

We're exploring possiblity to use fuse for our own distributed storage
implementation and big iovec[] arrays of many page-size chunks is typical
use-case for device virtualization thread performing i/o on behalf of
virtual-machine it serves.

Thanks,
Maxim

---

Maxim Patlasov (4):
      fuse: add basic support of iovec[] to fuse_req
      fuse: re-work fuse_get_user_pages() to operate on iovec[]
      fuse: re-work fuse_direct_io() to operate on iovec[]
      fuse: re-work fuse_direct_IO()


 fs/fuse/dev.c    |   52 ++++++++++++++++++-
 fs/fuse/file.c   |  145 ++++++++++++++++++++++++++++++------------------------
 fs/fuse/fuse_i.h |   12 ++++
 3 files changed, 140 insertions(+), 69 deletions(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-08 16:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-20 11:50 [PATCH 0/4] fuse: optimize scatter-gather direct IO Maxim Patlasov
2012-07-20 11:50 ` [PATCH 1/4] fuse: add basic support of iovec[] to fuse_req Maxim Patlasov
2012-08-08 16:02   ` Miklos Szeredi
2012-07-20 11:50 ` [PATCH 2/4] fuse: re-work fuse_get_user_pages() to operate on iovec[] Maxim Patlasov
2012-07-20 11:50 ` [PATCH 3/4] fuse: re-work fuse_direct_io() " Maxim Patlasov
2012-07-20 11:50 ` [PATCH 4/4] fuse: re-work fuse_direct_IO() Maxim Patlasov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome