All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul Smith" <pausmith@nortelnetworks.com>
To: nfs@lists.sourceforge.net
Subject: NFS client write performance issue ... thoughts?
Date: Mon, 5 Jan 2004 17:11:11 -0500	[thread overview]
Message-ID: <16377.57599.284453.729190@lemming.engeast.baynetworks.com> (raw)

Hi all; we've been doing some examination of NFS client performance, and
have seen this apparently sub-optimal behavior: anyone here have any
comments on this observation or thoughts about it?

Thanks!

> I was looking at the code (which doesn't appear to be fixed in 2.6),
> and here's what I think it's doing.
> 
> The Linux NFS client code is capable of only remembering a write to a
> single contiguous chunk in each 4KB page of a file.  If a second
> non-contiguous write occurs to the page, the first write has to be
> flushed to the server.  So if the view server is seeking around in a
> file writing a few bytes here and a few there, whenever it does a
> write to a page that has already been written, the first write has to
> be flushed to the server.  The code that does most of this is in
> fs/nfs/write.c, function nfs_update_request().  That's the routine
> that, given a new write request, searches for an existing one that is
> contiguous with the new one.  If it finds a contiguous request, the
> new one is coalesced with it and no NFS activitity is required.  If
> instead it finds a pending write to the same page, it returns EBUSY to
> its caller, which tells the caller (nfs_updatepage()) to synchronously
> write the existing request to the server.
> 
> The Solaris NFS client (and probably most other NFS client
> implementations) doesn't work this way.  Whenever a small write is
> made to a block of a file, the block is read from the server, and then
> the write is applied to the cached block.  If the block is already in
> cache, the write is applied to block without any NFS transactions
> being required.  When the file is closed or fsync()ed, the entire
> block is written to the server.  So the client code doesn't need to
> record each individual small write to a block, it just modifies the
> cached block as necessary.
> 
> I don't know why the Linux NFS client doesn't work this way, but I
> think it wouldn't be difficult to make it work that way.  In some
> scenarios, this might be a performance hit (because an entire block of
> the file has to be read from the server just to write a few bytes to
> it), but I think that in most cases, doing it the Solaris way would be
> a performance win.  I'd guess that if any sort of database, such as a
> GDBM database, is accessed over NFS, the Linux method would result in
> much poorer performance than the Solaris method.


-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@nortelnetworks.com>   HASMAT: HA Software Mthds & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

             reply	other threads:[~2004-01-05 22:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05 22:11 Paul Smith [this message]
2004-01-08 15:26 ` NFS client write performance issue ... thoughts? Paul Smith
2004-01-06  4:34 Trond Myklebust
2004-01-06  6:33 ` Paul Smith
2004-01-06 16:17 Lever, Charles
2004-01-06 18:10 ` Paul Smith
2004-01-07 20:50 Lever, Charles
2004-01-08 17:32 trond.myklebust
2004-01-08 17:47 ` Paul Smith
2004-01-08 17:48 ` trond.myklebust
2004-01-09 21:30 trond.myklebust
2004-01-12 21:37 ` Paul Smith
2004-01-12 12:45 Mikkelborg, Kjetil
2004-01-12 17:30 ` Paul Smith

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=16377.57599.284453.729190@lemming.engeast.baynetworks.com \
    --to=pausmith@nortelnetworks.com \
    --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.