All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Shyam Prasad N <nspmangalore@gmail.com>,
	CIFS <linux-cifs@vger.kernel.org>,
	Jeff Layton <jlayton@redhat.com>,
	David Howells <dhowells@redhat.com>
Subject: Re: [PATCH] smb3: add rasize mount parameter to improve performance of readahead
Date: Fri, 30 Apr 2021 14:22:20 -0500	[thread overview]
Message-ID: <CAH2r5mtE2g=p_rKThrDR_4N6=zqaBiz_KpK+bPpw5Q+qeFuTjQ@mail.gmail.com> (raw)
In-Reply-To: <20210430115948.GL1847222@casper.infradead.org>

On Fri, Apr 30, 2021 at 7:00 AM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Fri, Apr 30, 2021 at 04:19:27PM +0530, Shyam Prasad N wrote:
> > Although ideally, I feel that we (cifs.ko) should be able to read in
> > larger granular "chunks" even for small reads, in expectation that
> > surrounding offsets will be read soon.
>
> Why?  How is CIFS special and different from every other filesystem that
> means you know what the access pattern of userspace is going to be better
> than the generic VFS?

In general small chunks are bad for network file systems since the 'cost' of
sending a large read or write on the network (and in the call stack on
the client
and server, with various task switches etc) is not much more than a small one.
This can be different on a local file system with less latency between request
and response and fewer task switches involved on client and server.


There are tradeoffs between - having multiple small chunks in flight
vs. fewer large chunks in flight - but a general idea is that if possible it can
be much faster to keep some requests in flight and keep some activity:
- on the network
- on the server side
- on the client side

to avoid "dead time" where nothing is happening on the network due to latency
decrypting on the client or server etc.  For this reason it makes sense that
having multiple 4 1MB reads in flight (e.g. copying a file with new "rasize"
mount parm set to (e.g.) 4MB for cifs.ko) can be much faster than only
having 1 1MB
read in flight at one time, and much, much faster than using direct
i/o where some
tools like "rsync" use quite small i/o sizes (cp uses 1MB i/o if
uncached i/o for
case where mounted to cifs and nfs but rsync uses a small size which hurts
uncached performance greatly)
uses much smaller)


-- 
Thanks,

Steve

  parent reply	other threads:[~2021-04-30 19:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-24 19:27 [PATCH] smb3: add rasize mount parameter to improve performance of readahead Steve French
2021-04-24 20:08 ` Steve French
2021-04-25  2:09 ` Matthew Wilcox
2021-04-25  2:36   ` Steve French
2021-04-25 16:50     ` Steve French
2021-04-26  4:52       ` Shyam Prasad N
2021-04-26 11:54         ` Matthew Wilcox
2021-04-27  2:23           ` Steve French
2021-04-30 10:49           ` Shyam Prasad N
2021-04-30 11:59             ` Matthew Wilcox
2021-04-30 12:53               ` Shyam Prasad N
2021-04-30 19:22               ` Steve French [this message]
2021-05-01 18:35                 ` Matthew Wilcox
2021-05-01 18:47                   ` Steve French
2021-05-01 18:50                     ` Steve French

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='CAH2r5mtE2g=p_rKThrDR_4N6=zqaBiz_KpK+bPpw5Q+qeFuTjQ@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=jlayton@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=nspmangalore@gmail.com \
    --cc=willy@infradead.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 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.