Linux NFS development
 help / color / mirror / Atom feed
From: Greg Banks <gnb@melbourne.sgi.com>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Linux NFS Mailing List <nfs@lists.sourceforge.net>
Subject: [PATCH] SGI 905314 (1/2): make NFSSVC_MAXBLKSIZE depend on PAGE_SIZE
Date: Fri, 28 Nov 2003 23:43:19 +1100	[thread overview]
Message-ID: <3FC742E7.910F518B@melbourne.sgi.com> (raw)

G'day,

SGI bug #905314

This patch makes NFSSVC_MAXBLKSIZE depend on PAGE_SIZE so that machines
with large page sizes can take advantage of that feature to serve NFS
with larger blocksizes, increasing performance and avoiding a fallback
to synchronous traffic between machines with page sizes greater than 8K.
Also, documents the actual constraints on NFSSVC_MAXBLKSIZE.

The patch has been running for some hours now, reading and writing NFSv3
over UDP on gigabit ethernet between two Altix boxes (16K page sizes) with
4G RAM each.  I have verified with ethereal that reads and writes proceed
in 32K blocks, and performance tests show good throughput for streaming
reads and writes (although 2.6.0-test8 still does better).


--- /usr/tmp/TmpDir.28396-0/linux/linux/include/linux/nfsd/const.h_1.5	Fri Nov 28
23:07:47 2003
+++ linux/include/linux/nfsd/const.h	Fri Nov 28 23:07:36 2003
@@ -12,6 +12,7 @@
 #include <linux/nfs.h>
 #include <linux/nfs2.h>
 #include <linux/nfs3.h>
+#include <asm/page.h>
 
 /*
  * Maximum protocol version supported by knfsd
@@ -19,9 +20,24 @@
 #define NFSSVC_MAXVERS		3
 
 /*
- * Maximum blocksize supported by daemon currently at 8K
+ * Maximum blocksize supported by daemon.  The value is
+ * constrained by 1) has to fit in a UDP datagram less some
+ * headers 2) must be a multiple of page size 3) will have to
+ * be allocated plus some headers as a physically contiguous
+ * buffer for each nfsd.   For best performance we usually want
+ * the largest value consistent with those constraints.   The
+ * fuzziest condition is 3;  here we choose to limit the gfp
+ * allocation order <= 2 and cross our fingers.  Note we also
+ * choose powers of 2 like the client code even though there's
+ * no good reason to do so.
  */
+#if PAGE_SIZE > (8*1024)
+#define NFSSVC_MAXBLKSIZE	(32*1024)
+#elif PAGE_SIZE == (8*1024)
+#define NFSSVC_MAXBLKSIZE	(16*1024)
+#else /* 4K pages */
 #define NFSSVC_MAXBLKSIZE	(8*1024)
+#endif
 
 #ifdef __KERNEL__
 



Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

             reply	other threads:[~2003-11-28 12:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-28 12:43 Greg Banks [this message]
2003-11-30 22:26 ` [PATCH] SGI 905314 (1/2): make NFSSVC_MAXBLKSIZE depend on PAGE_SIZE Neil Brown
2003-11-30 23:26   ` Greg Banks
2003-12-01 11:38     ` Bogdan Costescu
2003-12-02  0:26       ` Re: [PATCH] SGI 905314 (1/2): make NFSSVC_MAXBLKSIZE dependon PAGE_SIZE Greg Banks
2003-12-02 11:26       ` Mailbox corruption on The NFS server Shivaji Navale
2003-12-02 18:51         ` Juri Haberland
2003-12-02 19:35           ` Trond Myklebust
2003-12-03 10:56             ` Shivaji Navale

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=3FC742E7.910F518B@melbourne.sgi.com \
    --to=gnb@melbourne.sgi.com \
    --cc=neilb@cse.unsw.edu.au \
    --cc=nfs@lists.sourceforge.net \
    /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