Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 2003 23:37:36 +0100
From:      Steve Keay <steve@keay.com>
To:        hackers@freebsd.org
Subject:   NFS access_cache not working
Message-ID:  <20031022233735.S7575@netbenefit.com>

next in thread | raw e-mail | index | archive | help
We have puzzled long and hard over this one.  I have seen similar
questions in the past, but no answers:

Using a FreeBSD 4.8 NFS client, mount options are the defaults.  I
watch for NFS activity using tcpdump.

Every single stat() or open() causes "access" RPCs on the wire.

In fact, doing "cat file" causes *three* access RPCs.  Two of these
are properly cached, but one is not.  For instance, if I set
vfs.nfs.access_cache_timeout=60 then "cat file" will cause three
access RPCs.  Doing the command again within 60 seconds causes just
one access RPC.  I don't think it should do any.

18:24:07.046508 10.10.10.106.3411144459 > 10.10.10.197.2049: 128 access fh Unknown/1 003f
18:24:07.049984 10.10.10.106.3411144460 > 10.10.10.197.2049: 128 access fh Unknown/1 003f
18:24:07.053673 10.10.10.106.3411144461 > 10.10.10.197.2049: 128 access fh Unknown/1 003f

I get the same results using a NetApp server or a Linux server.

Looking at nfs/nfs_vnops.c, it look like the result of the access rpc
ought to be cached.  Is this non-cached behaviour a feature that I can
turn off?  Other clients running linux happily cache everything, and
do not cause any nfs operations until the cache times out, but then
linux doesn't do any access rpc calls.  The FreeBSD clients are
killing the NFS server.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031022233735.S7575>