From: Olaf Kirch <okir@suse.de>
To: nfs@lists.sourceforge.net
Subject: nfsd write throughput
Date: Mon, 2 Aug 2004 18:24:49 +0200 [thread overview]
Message-ID: <20040802162448.GB21365@suse.de> (raw)
[-- 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);
next reply other threads:[~2004-08-02 16:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-02 16:24 Olaf Kirch [this message]
2004-08-03 2:10 ` nfsd write throughput 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
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=20040802162448.GB21365@suse.de \
--to=okir@suse.de \
--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 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.