2002-03-28 11:37:14

by Matt Heaton

[permalink] [raw]
Subject: Caching

I have an NFS server that is 99% reads and 1% writes. When I do writes the NFS server (Or maybe the client) seems to cache files so that when a
write occurs my NFS clients don't get the updated files for a while. Is there some way to expire the cache whenever a write occurs for a specific
file? I want the cache to be in place as 99% of all NFS service is reads on my network, I just want updates available right away for the writes? Any
clues? I am running 2.4.18 with NFS_ALL patch compiled in on the clients, and 2.4.18 (No patch) for the server.

Thanks,
Matt


2002-03-29 20:48:42

by Lever, Charles

[permalink] [raw]
Subject: RE: Caching

hi matt-

fsync() or close() will push the writes to the server immediately. you can
also mount
the file system with the "sync" option to cause all write operations to push
the data
to the server before returning to your application.

-----Original Message-----
From: Matt Heaton [mailto:[email protected]]
Sent: Friday, March 29, 2002 6:39 AM
To: [email protected]
Subject: [NFS] Caching


I have an NFS server that is 99% reads and 1% writes. When I do writes the
NFS server (Or maybe the client) seems to cache files so that when a
write occurs my NFS clients don't get the updated files for a while. Is
there some way to expire the cache whenever a write occurs for a specific
file? I want the cache to be in place as 99% of all NFS service is reads on
my network, I just want updates available right away for the writes? Any
clues? I am running 2.4.18 with NFS_ALL patch compiled in on the clients,
and 2.4.18 (No patch) for the server.

Thanks,
Matt