All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Banks <gnb@sgi.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: nfs@lists.sourceforge.net, Wim Colgate <Wim.Colgate@xensource.com>
Subject: Re: simple question about r/wsize
Date: Mon, 8 Oct 2007 18:54:00 +1000	[thread overview]
Message-ID: <20071008085400.GB30931@sgi.com> (raw)
In-Reply-To: <1191294340.6611.34.camel@heimdal.trondhjem.org>

On Mon, Oct 01, 2007 at 11:05:40PM -0400, Trond Myklebust wrote:
> On Tue, 2007-10-02 at 04:51 +0200, Gabriel Barazer wrote:
> > On 10/02/2007 1:11:01 AM +0200, Trond Myklebust 
> > <trond.myklebust@fys.uio.no> wrote:
> > > On Mon, 2007-10-01 at 15:04 -0700, Wim Colgate wrote:
> > >> What???s the current NFS v3 wsize and rsize? It appears to be 4K ??? and
> > >> just wanted a confirmation.
> > >>
> > > 
> > > It sounds like you are working with an old system. IIRC, older versions
> > > of RedHat used to jimmy the 'mount' command to make 4k the default,
> > > because that worked best with UDP mounts on crummy networks.
> > > 
> > > For newer clients, the default should depend on what your server
> > > specifies in the FSINFO nfs command. For most servers, when you mount
> > > with a TCP connection, the default will be 32k, but some may have larger
> > > defaults (NetApp servers often specify a 64k default) or smaller (older
> > > Linux servers will support an 8k maximum).
> > 
> > I see on my servers (>2.6.21, latest nfs-utils) that the rsize/wsize is 
> > actually defined by the amount of memory on the NFS server. It seems to 
> > set the rsize/wsize to (total memory)/8192 (512k in my case for a 4GB 
> > nfs server). Is it a bug or a wanted behavior ?
> 
> On a standard 2.6.23-rc8, the server sets RPCSVC_MAXPAYLOAD_TCP == 1MB,
> RPCSVC_MAXPAYLOAD_UDP == 32k. There is no link to the total amount of
> memory.

I think Gabriel may be referring to this code in fs/nfsd/nfssvc.c

202         if (nfsd_max_blksize == 0) {
203                 /* choose a suitable default */
204                 struct sysinfo i;
205                 si_meminfo(&i);
206                 /* Aim for 1/4096 of memory per thread
207                  * This gives 1MB on 4Gig machines
208                  * But only uses 32K on 128M machines.
209                  * Bottom out at 8K on 32M and smaller.
210                  * Of course, this is only a default.
211                  */
212                 nfsd_max_blksize = NFSSVC_MAXBLKSIZE;
213                 i.totalram <<= PAGE_SHIFT - 12;
214                 while (nfsd_max_blksize > i.totalram &&
215                        nfsd_max_blksize >= 8*1024*2)
216                         nfsd_max_blksize /= 2;
217         }

You can override this default by writing to
/proc/fs/nfsd/max_block_size (before the first nfsd is started,
which basically means modifying /etc/init.d/nfsserver).

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
Apparently, I'm Bedevere.  Which MPHG character are you?
I don't speak for SGI.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

      reply	other threads:[~2007-10-08  8:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-01 22:04 simple question about r/wsize Wim Colgate
2007-10-01 23:11 ` Trond Myklebust
2007-10-01 23:19   ` Wim Colgate
2007-10-02  2:51   ` Gabriel Barazer
2007-10-02  3:05     ` Trond Myklebust
2007-10-08  8:54       ` Greg Banks [this message]

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=20071008085400.GB30931@sgi.com \
    --to=gnb@sgi.com \
    --cc=Wim.Colgate@xensource.com \
    --cc=nfs@lists.sourceforge.net \
    --cc=trond.myklebust@fys.uio.no \
    /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.