Re: Disable NFS client cache (or other traffic reduction methods)

From: Mohan Srinivasan (mohan_srinivasan_at_yahoo.com)
Date: 04/07/05

  • Next message: Gennady Proskurin: "bge hardware vlan"
    Date: Thu, 7 Apr 2005 14:46:45 -0700 (PDT)
    To: dart@nersc.gov, Charles Swiger <cswiger@mac.com>
    
    

    Hi,

    Unfortunately, there's no way in the FreeBSD NFS client to
    disable data caching. Setting the ac* values to 0 will have
    the effect of disabling the attribute cache, which means
    that you'll never fetch attributes from the cache, but force
    an over-the-wire getattr call each time. But this does not
    disable data caching. For reference, take a look at
    nfs_loadattrcache() and nfs_getattrcache().

    The real reason for tweaking the ac* values is to improve
    on the consistency of the cached data (for applications with
    data shared across multiple clients). By setting the ac* values
    to 0 and bypassing attr caching completely, you force much
    more frequent mtime checks giving you much better consistency
    of the cached data.

    I added Direct IO support for the NFS client for exactly this
    reason - to bypass data caching. But I tickled a bug in the
    -current NFS server when I use Direct IO on the client and
    I have left it disabled until I get a chance to fix that bug.
    Direct IO support works fine when used against a FreeBSD 4.x
    NFS server or a NetApp filer.

    mohan

    --- Eli Dart <dart@nersc.gov> wrote:
    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    >
    > >> Is there a way to disable client-side caching? I've looked, and
    > >> can't seem to find one. Or, do I have this wrong and there is
    > >> something else that is causing this?
    > >
    > >
    > > Take a look through "man mount_nfs" for:
    > >
    > > -a Set the read-ahead count to the specified value. This may
    > > be in
    > > the range of 0 - 4, and determines how many blocks will be
    > > read
    > > ahead when a large file is being read sequentially. Trying a
    > > value greater than 1 for this is suggested for mounts with a
    > > large bandwidth * delay product.
    >
    > I did see this. Since the client is not reading any files (I think
    > all the reads are being done by the NFS layer, not by any userland
    > processes with open files) I had ignored -a.
    >
    > >
    > > ...and the -o ac*** options. Although you may be right-- I was a bit
    > > surprised not to see a "-o noac", myself. Solaris has one:
    >
    > Hmmmm.....any NFS gurus know whether setting the ac* options to 0
    > will disable client caching? Or, will setting these to 0 result in
    > the client NFS layer fetching the data from the server and then
    > immediately expiring it?
    >
    > Thanks,
    >
    > --eli
    >
    >
    >
    > >
    > > noac Suppress data and attribute caching.
    > >
    > > :-)
    > >
    >
    > - --
    >
    > - -------------------------------------------------------------------
    > Eli Dart Office: (510) 495-2999
    > NERSC Center Networking and Security Group Cell: (510) 703-4508
    > Lawrence Berkeley National Laboratory Fax: (510) 486-4316
    > PGP Fingerprint = C970 F8D3 CFDD 8FFF 5486 343A 2D31 4478 5F82 B2B3
    > - -------------------------------------------------------------------
    > -----BEGIN PGP SIGNATURE-----
    > Version: GnuPG v1.4.0 (MingW32)
    > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
    >
    > iD4DBQFCVZYOLTFEeF+CsrMRAlReAKDMxrs97SSkZJRhaEVxRRpO51XrsACXX983
    > grAaYcgINLwiLtzoz3nLhQ==
    > =GAZ7
    > -----END PGP SIGNATURE-----
    >
    > _______________________________________________
    > freebsd-net@freebsd.org mailing list
    > http://lists.freebsd.org/mailman/listinfo/freebsd-net
    > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
    >
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Gennady Proskurin: "bge hardware vlan"

    Relevant Pages

    • Re: Help me replace some Windows installations
      ... > Possible with untrusted clients in SMB, and trusted clients in NFS. ... >> trust every client that might be connected to this network. ... > Still, user ABC on client, accesses to server with rights of the user ... > which Peter already told you about, or use SMB for Linux to Linux ...
      (comp.os.linux.setup)
    • Errors writing large files via NFS
      ... files larger than a certain size to a NFS server. ... client systems, although the definition of "too large" varies. ... network paths involved, I'm pretty sure we're not seeing a network problem. ...
      (Tru64-UNIX-Managers)
    • Re: Still getting NFS client locking up
      ... > the same NFS lockups. ... > Reading from the server works perfectly all the time. ... > NFS CLIENT: ... in particular, look at traces for any client blocked in NFS, ...
      (freebsd-current)
    • Re: 5.3Beta7: diskless boot, has someone succeeded?
      ... > Are you sure you have NFS running on the NFS server? ... The diskless client boots from floppy, ... and mounts root from the master. ... 100000 2,3,4 local,udp6,tcp6,udp,tcp rpcbind superuser ...
      (freebsd-current)
    • Re: sfu nfs client contacting port 80 on nfs server
      ... > nfs daemon running. ... >>> Your server has IIS on it? ... Or are you saying this is going over mrxdav.sys on the client? ... ask the SFU guys why their client is talking to the DAV client. ...
      (microsoft.public.win2000.file_system)