All of lore.kernel.org
 help / color / mirror / Atom feed
* nfsd write throughput
@ 2004-08-02 16:24 Olaf Kirch
  2004-08-03  2:10 ` Greg Banks
  2004-08-03  2:23 ` Neil Brown
  0 siblings, 2 replies; 13+ messages in thread
From: Olaf Kirch @ 2004-08-02 16:24 UTC (permalink / raw)
  To: nfs

[-- Attachment #1: Type: text/plain, Size: 485 bytes --]

Hi,

I've been looking at the write throughput with NFSv3, and played around
a little. Here's a patch that seems to increase iozone's write throughput
from 6MB/s to close to 10MB/s on my test machine.

(The improvement in rewrite throughput is less pronounced). I'm still
doing some testing on this, but I would still appreciate some feedback,
especially from people seeing throughput problems.

Olaf
-- 
Olaf Kirch     |  The Hardware Gods hate me.
okir@suse.de   |
---------------+ 

[-- Attachment #2: nfsd-write-speedup --]
[-- Type: text/plain, Size: 1160 bytes --]

Index: linux-2.6.5/fs/nfsd/vfs.c
===================================================================
--- linux-2.6.5.orig/fs/nfsd/vfs.c	2004-08-02 14:48:02.000000000 +0200
+++ linux-2.6.5/fs/nfsd/vfs.c	2004-08-02 17:54:28.000000000 +0200
@@ -45,6 +45,7 @@
 #include <linux/quotaops.h>
 #include <linux/dnotify.h>
 #include <linux/xattr_acl.h>
+#include <linux/backing-dev.h>
 
 #include <asm/uaccess.h>
 
@@ -810,6 +811,22 @@
 		}
 		last_ino = inode->i_ino;
 		last_dev = inode->i_sb->s_dev;
+	} else if (err >= 0 && !stable) {
+		/* If we've been writing several pages, schedule them
+		 * for the disk immediately. The client may be streaming
+		 * and we don't want to hang on a huge journal sync when the
+		 * commit comes in
+		 */
+		struct address_space	*mapping;
+
+		/* This assumes a minimum page size of 1K, and will issue
+		 * a filemap_flushfast call every 64 pages written by the
+		 * client. */
+		if ((cnt & 1023) == 0
+		 && ((offset / cnt) & 63) == 0
+		 && (mapping = inode->i_mapping) != NULL
+		 && !bdi_write_congested(mapping->backing_dev_info))
+			filemap_flushfast(mapping);
 	}
 
 	dprintk("nfsd: write complete err=%d\n", err);

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: nfsd write throughput
@ 2004-08-04  0:10 Bruce Allan
  2004-08-04  8:18 ` Greg Banks
  0 siblings, 1 reply; 13+ messages in thread
From: Bruce Allan @ 2004-08-04  0:10 UTC (permalink / raw)
  To: nfs; +Cc: okir, gnb

Greg Banks <gnb@sgi.com> wrote on 08/02/2004 07:10:18 PM:

<snip>
> First, the way the v3 server is supposed to work is that normal
> page cache pressure pushes pages from unstable writes to disk
> before the COMMIT call arrives from the client.  The best way to
> achieve this for a dedicated NFS server box is tuning the pdflush
> parameters to be more aggressive about writing back dirty pages,
> e.g. bumping down the following in /proc/vm:
> dirty_background_ration, dirty_ratio, dirty_writeback_centisecs,
> and dirty_expire_centisecs.  I have to admit I've not tried this
> yet on 2.6 but the equivalent on 2.4 has been generally useful.
<snip>

This information (and the comparable info for 2.6) should be in Chapter
5. Optimizing NFS Performance of the NFS-HOWTO
(http://nfs.sourceforge.net/nfs-howto/performance.html).  Greg, can you
throw together a documentation patch?  If you don't have the time and/or
inclination, I could give it a shot if you care to review the content. 
Or will this be a wasted effort if Olaf's changes (or something along
those lines) gets in.

Regards,
---
Bruce Allan  <bruce.allan@us.ibm.com>
Software Engineer, Linux Technology Center
IBM Corporation, Beaverton OR
503-578-4187   IBM Tie-line 775-4187



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

end of thread, other threads:[~2004-08-04  8:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-02 16:24 nfsd write throughput Olaf Kirch
2004-08-03  2:10 ` Greg Banks
2004-08-03  6:02   ` Olaf Kirch
2004-08-03  7:55     ` Greg Banks
2004-08-03  8:09       ` Olaf Kirch
2004-08-03  8:28         ` Greg Banks
2004-08-03 10:32       ` Olaf Kirch
2004-08-03 10:52         ` Olaf Kirch
2004-08-03 11:24         ` Greg Banks
2004-08-03 13:26           ` Olaf Kirch
2004-08-03  2:23 ` Neil Brown
  -- strict thread matches above, loose matches on Subject: below --
2004-08-04  0:10 Bruce Allan
2004-08-04  8:18 ` Greg Banks

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.