All of lore.kernel.org
 help / color / mirror / Atom feed
* Tuning NFS client write pagecache
@ 2010-08-06 12:21 Matthew Hodgson
  2010-08-06 13:26 ` Jim Rees
  0 siblings, 1 reply; 19+ messages in thread
From: Matthew Hodgson @ 2010-08-06 12:21 UTC (permalink / raw)
  To: linux-nfs

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

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

end of thread, other threads:[~2010-08-11 20:53 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-06 12:21 Tuning NFS client write pagecache Matthew Hodgson
2010-08-06 13:26 ` 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

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.