public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] wsync export option
@ 2010-02-03 23:44 Ben Myers
  2010-02-03 23:44 ` [RFC PATCH 1/4] Add 'wsync' " Ben Myers
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Ben Myers @ 2010-02-03 23:44 UTC (permalink / raw)
  To: linux-nfs

In April I did some research on why synchronous NFSv3 performance on XFS is so
rotten when compared to local filesystem performance.  The workload I chose to
work with is tar.

After taking some measurements I came to the conclusion that one of the big
problems is that we're not treating the log as stable storage.  By calling
write_inode_now() we've written the changes to the log first and then gone and
also written them out to the inode on disk.

In a short discussion of this issue on the xfs-oss list it was suggested that I
post the patches here for discussion.

The following series is adds a 'wsync' export option to nfsd.  It is intended
to be used on XFS with the wsync mount option.  When you already have a
synchronous log there is no need to sync metadata separately.

This is barely tested, YMMV, I could have this all wrong, etc, etc.  Here are
some very unscientific measurements taken over gigabit ethernet.

# time tar -xvf /mnt2/quilt-0.47.tar > /dev/null

No XFS wsync, no NFS wsync:
0m13.177s	0m13.301s	0m13.528s

XFS wsync set, no NFS wsync:
0m13.019s	0m13.232s	0m13.094s

XFS wsync set, NFS wsync set:
0m8.361s	0m8.400s	0m8.301s

Curious to hear if this is a reasonable thing to do.  Suggestions welcome.

Thanks!
	Ben

---

Ben Myers (4):
      Add 'wsync' export option.
      Add datasync argument to nfsd_sync_dir().
      If 'wsync' call vfs_fsync() instead of write_inode_now().
      If 'wsync' pass datasync=1 to vfs_fsync().


 fs/nfsd/export.c            |    1 +
 fs/nfsd/nfs4recover.c       |    2 +
 fs/nfsd/vfs.c               |   62 +++++++++++++++++++++++++++++++------------
 fs/nfsd/vfs.h               |    2 +
 include/linux/nfsd/export.h |    4 ++-
 5 files changed, 50 insertions(+), 21 deletions(-)

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

end of thread, other threads:[~2010-02-04 18:52 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-03 23:44 [RFC PATCH 0/4] wsync export option Ben Myers
2010-02-03 23:44 ` [RFC PATCH 1/4] Add 'wsync' " Ben Myers
2010-02-03 23:44 ` [RFC PATCH 2/4] Add datasync argument to nfsd_sync_dir() Ben Myers
2010-02-03 23:44 ` [RFC PATCH 3/4] If 'wsync' call vfs_fsync() instead of write_inode_now() Ben Myers
2010-02-03 23:44 ` [RFC PATCH 4/4] If 'wsync' pass datasync=1 to vfs_fsync() Ben Myers
2010-02-04 15:19   ` Christoph Hellwig
2010-02-04 17:20     ` bpm
2010-02-04 18:30       ` Christoph Hellwig
2010-02-04 18:38         ` Trond Myklebust
2010-02-04 18:40           ` Christoph Hellwig
2010-02-04 18:52             ` Trond Myklebust
2010-02-03 23:47 ` [ RFC PATCH 5/4 ] Add wsync export option to nfs-utils bpm
2010-02-03 23:58 ` [RFC PATCH 0/4] wsync export option Trond Myklebust
2010-02-04 15:21   ` Christoph Hellwig
2010-02-04 15:30 ` Christoph Hellwig
2010-02-04 18:15   ` bpm
2010-02-04 18:39     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox