nfsstats for new nfsserver

Rick Macklem rmacklem at uoguelph.ca
Wed Oct 19 15:55:41 UTC 2011


John wrote:
> Hi Folks,
> 
> I've been looking into different performance aspects of running
> the new nfsserver servering out zfs filesystems with 9.
> 
> I've run into a nfsstat question I thought I would ask about.
> >From nfsstat on a system that's been up for a few hours:
> 
> # nfsstat
> Client Info:
> 
> ... deleted ... all 0.
> 
> Server Info:
> Getattr Setattr Lookup Readlink Read Write Create Remove
> 1014376791 95502 1815135267 10181 8613463 6005951 0 0
> Rename Link Symlink Mkdir Rmdir Readdir RdirPlus Access
> 240 0 0 0 0 47964 0 547155
> Mknod Fsstat Fsinfo PathConf Commit
> 0 595932 45 0 74154
> Server Ret-Failed
> 0
> Server Faults
> 0
> Server Cache Stats:
> Inprog Idem Non-idem Misses
> 6308 0 3852 -1448802368
> Server Write Gathering:
> WriteOps WriteRPC Opsaved
> 6005951 6005951 0
> 
> 
> The 'Misses' value is very large. When looking at the source, if I'm
> following the code correctly (and I might not be), would it make sense
> to try increasing the size of the cache, or simply disabling it? Can
> do
> either - looking for opinions.
> 
Well, if everything is working well, you should always have misses and
nothing else. A hit means that an RPC has been retried. On TCP, this
implies that there should have been a network partitioning for a
significant period of time (or the client is retrying too agressively,
since the TCP layer should take care of packet loss, etc).

I'm actually surprised you see any hits. Are you using UDP? (In that
case there probably will be spurious RPC retries and the cache avoids
re-doing the RPC for those cases.)

The DRC is weird, in that it does not improve performance, but
correctness. Since the overhead should be minimal, I wouldn't
disable it, especially if you are using UDP.

> The Opsaved value being 0, would it make sense to simply disable
> gathering also?
> 
The new server doesn't do write gathering. It was mainly useful for
NFSv2, where all writes were synchronous.

--> The Opsaved field will always be 0. It's there for the default
    "nfsstat" output for backwards compatibility only.

If you use "nfsstat -e -s" you'll get the newer style of server stats.

> Last, just more of a comment, would it make sense to go ahead and
> treat
> these values as unsigned? They'll still wrap, but they would stay
> positive.
> 
Yea, I suppose the printfs should be changed someday, rick

> Thanks,
> John
> 
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"


More information about the freebsd-fs mailing list