All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Hodgson <matthew@mxtelecom.com>
To: linux-nfs@vger.kernel.org
Subject: Tuning NFS client write pagecache
Date: Fri, 06 Aug 2010 13:21:27 +0100	[thread overview]
Message-ID: <4C5BFE47.8020905@mxtelecom.com> (raw)

Hi all,

Is there any way to tune the linux NFSv3 client to prefer to write data 
straight to an async-mounted server, rather than having large writes to 
a file stack up in the local pagecache before being synced on close()?

I have an application which (stupidly) expects system calls to return 
fairly rapidly, otherwise an application-layer timeout occurs.  If I 
write (say) 100MB of data to an NFS share with the app, the write()s 
return almost immediately as the local pagecache is filled up - but then 
close() blocks for several minutes as the data is synced to the server 
over a slowish link.  Mounting the share as -o sync fixes this, as does 
opening the file O_SYNC or O_DIRECT - but ideally I want to generally 
encourage the client to flush a bit more aggressively to the server 
without the performance hit of making every write explicitly synchronous.

Is there a way to cap the size of pagecache that the NFS client uses?

This is currently on a 2.6.18 kernel (Centos 5.5), although I'm more 
than happy to use something less prehistoric if that's what it takes.

M.

-- 
Matthew Hodgson
Development Program Manager
OpenMarket | www.openmarket.com/europe
matthew.hodgson@openmarket.com

             reply	other threads:[~2010-08-06 12:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-06 12:21 Matthew Hodgson [this message]
2010-08-06 13:26 ` Tuning NFS client write pagecache Jim Rees
2010-08-06 14:05   ` Peter Chacko
2010-08-06 17:37     ` Trond Myklebust
2010-08-06 19:29       ` Peter Chacko
2010-08-06 19:39         ` Trond Myklebust
2010-08-07  3:15           ` Peter Chacko
2010-08-10 16:27             ` Chuck Lever
2010-08-10 17:52               ` Peter Chacko
2010-08-10 18:19                 ` David Brodbeck
2010-08-10 19:16                 ` Chuck Lever
2010-08-10 20:50               ` Gilliam, PaulX J
2010-08-10 21:47                 ` Chuck Lever
2010-08-11  2:09                   ` Peter Chacko
2010-08-11 16:05                     ` Chuck Lever
2010-08-11 17:14                       ` Peter Chacko
2010-08-11 20:51                         ` Chuck Lever
2010-08-06 16:29   ` Matthew Hodgson
2010-08-07  0:25     ` Matthew Hodgson

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=4C5BFE47.8020905@mxtelecom.com \
    --to=matthew@mxtelecom.com \
    --cc=linux-nfs@vger.kernel.org \
    /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.