[comp.protocols.nfs] Flushing NFS caches

roy@alanine.phri.nyu.edu (Roy Smith) (04/13/91)

	Sometimes, when I'm working on multiple clients of the same NFS
server at the same time, I'll do something on one and not see it on the
other for a while.  This is obviously because of NFS caching and can by
annoying.  Is there any simple way to force all the NFS caches to get
flushed, like sync does for the ufs caches?
--
Roy Smith, Public Health Research Institute
455 First Avenue, New York, NY 10016
roy@alanine.phri.nyu.edu -OR- {att,cmcl2,rutgers,hombre}!phri!roy
"Arcane?  Did you say arcane?  It wouldn't be Unix if it wasn't arcane!"

geoff@bodleian.East.Sun.COM (Geoff Arnold @ Sun BOS - R.H. coast near the top) (04/16/91)

Quoth roy@alanine.phri.nyu.edu (Roy Smith) (in <1991Apr12.185019.20329@phri.nyu.edu>):
#
#	Sometimes, when I'm working on multiple clients of the same NFS
#server at the same time, I'll do something on one and not see it on the
#other for a while.  This is obviously because of NFS caching and can by
#annoying.  Is there any simple way to force all the NFS caches to get
#flushed, like sync does for the ufs caches?

Not as such. However if you're prepared to take a slight performance
hit (hah!) you can tweak the behaviour in the way you want,
using the acXXX mount options. (See "man mount" for details.)
If you set "noac" you can run in an essentially synchronous
mode.

Geoff

-- Geoff Arnold, PC-NFS architect, Sun Microsystems. (geoff@East.Sun.COM)   --
------------------------------------------------------------------------------
--     Sun Microsystems PC Distributed Systems ...                          --
--            ... soon to be a part of SunTech (stay tuned for details)     --

ckollars@deitrick.East.Sun.COM (Chuck Kollars - Sun Technical Marketing - Boston) (04/16/91)

In article <5522@eastapps.East.Sun.COM> geoff@east.sun.com (Geoff Arnold @ Sun BOS - R.H. coast near the top) writes:
>Quoth roy@alanine.phri.nyu.edu (Roy Smith) (in <1991Apr12.185019.20329@phri.nyu.edu>):
>#
>#	Sometimes, when I'm working on multiple clients of the same NFS
>#server at the same time, I'll do something on one and not see it on the
>#other for a while.  This is obviously because of NFS caching and can by
>#annoying.  Is there any simple way to force all the NFS caches to get
>#flushed, like sync does for the ufs caches?
>
>Not as such. However if you're prepared to take a slight performance
>hit (hah!) you can tweak the behaviour in the way you want,
      ^^^
I mentioned to Geoff that with workstations (I don't know about with
PCs) the performance hit is often so _huge_ that there should be a
smiley here.  He suggested I mention it to everybody else too.

(The performance hit can be to the client, or to the file server, or to
the network, or usually to all three.  It may not look too bad when
you're the only one doing it.  But when you put your application into
production and specify "noac" on _all_ the clients on your network,
look out.)

>using the acXXX mount options. (See "man mount" for details.)
>If you set "noac" you can run in an essentially synchronous
>mode.

Since running NFS in an essentially synchronous mode exacts such a
steep performance penalty, think again about what problem you're trying
to solve and about other ways to solve it.

 - If the underlying problem is ensuring reliable mail delivery,
   get the latest version of mail.  It works right reliably without
   having to set "noac".

 - If the underlying problem is synchronizing activity on several
   different machines, consider including some RPC calls in your
   application.

 - If the underlying problem is providing some kind of network "license
   server", use RPCs and a daemon process on the server.

>Geoff
>
>-- Geoff Arnold, PC-NFS architect, Sun Microsystems. (geoff@East.Sun.COM)   --
>------------------------------------------------------------------------------
>--     Sun Microsystems PC Distributed Systems ...                          --
>--            ... soon to be a part of SunTech (stay tuned for details)     --

cheers!
---
chuck kollars    <ckollars@East.Sun.COM>
Sun Technical Marketing, located in Sun's Boston Development Center