Re: NFSv4 performance degradation with 12.0-CURRENT client

From: Alan Somers <asomers_at_freebsd.org>
Date: Fri, 25 Nov 2016 14:42:53 -0700
On Fri, Nov 25, 2016 at 6:57 AM, Konstantin Belousov
<kostikbel_at_gmail.com> wrote:
> On Fri, Nov 25, 2016 at 12:54:07PM +0000, Rick Macklem wrote:
>> Well, ideally theer would be a VOP_MMAPDONE() or something like that, which
>> would tell the NFSv4 client that I/O is done on the vnode so it can close it.
>> If there was some way for the NFSv4 VOP_CLOSE() to be able to tell if the file
>> has been mmap'd, that would help since it could close the ones that are not
>> mmap'd on the last descriptor close.
>> (A counter wouldn't be as useful, since NFSv4 would have to keep checking it to
>>  see if it can do the close yet, but it might still be doable.)
>
> I thought that the issue was in tracking any opens and mmaps, but from this
> reply it is not that clear.  Do you need callback when all opens and mmaps
> have ended, or only opens and mmaps for write ?  If later, we already have
> a suitable mechanism VOP_ADD_WRITECOUNT().

Mounting nullfs with the nocache option, ad kib suggested, fixed the
problem.  Also, applying kib's patch and then mounting nullfs with
default options also fixed the problem.  Here is the nfsstat output
for "ls -al" when using kib's patch.  Notice the client has far fewer
opens:
nfsstat -s -e -z

Server Info:
  Getattr   Setattr    Lookup  Readlink      Read     Write    Create    Remove
      494         0         0         0         0         1         0         0
   Rename      Link   Symlink     Mkdir     Rmdir   Readdir  RdirPlus    Access
        0         0         0         0         0         0         0         0
    Mknod    Fsstat    Fsinfo  PathConf    Commit   LookupP   SetClId SetClIdCf
        0         0         0         0         0         0         0         0
     Open  OpenAttr OpenDwnGr  OpenCfrm DelePurge   DeleRet     GetFH      Lock
        0         0         0         0         0         0         0         0
    LockT     LockU     Close    Verify   NVerify     PutFH  PutPubFH PutRootFH
        0         0         0         0         0       494         0         0
    Renew RestoreFH    SaveFH   Secinfo RelLckOwn  V4Create
        0         0         0         0         0         0
Server:
Retfailed    Faults   Clients
        0         0         0
OpenOwner     Opens LockOwner     Locks    Delegs
        0         0         0         0         0
Server Cache Stats:
   Inprog      Idem  Non-idem    Misses CacheSize   TCPPeak
        0         0         0       495     17280     17280
nfsstat -c -e -z
Client Info:
Rpc Counts:
  Getattr   Setattr    Lookup  Readlink      Read     Write    Create    Remove
       14         0         0         0         0         0         0         0
   Rename      Link   Symlink     Mkdir     Rmdir   Readdir  RdirPlus    Access
        0         0         0         0         0         0         0         0
    Mknod    Fsstat    Fsinfo  PathConf    Commit   SetClId SetClIdCf      Lock
        0         0         0         0         0         0         0         0
    LockT     LockU      Open   OpenCfr
        0         0         0         0
OpenOwner     Opens LockOwner     Locks    Delegs  LocalOwn LocalOpen LocalLOwn
      592       588         0         0         0         0         0         0
LocalLock
        0
Rpc Info:
 TimedOut   Invalid X Replies   Retries  Requests
        0         0         0         0       494
Cache Info:
Attr Hits    Misses Lkup Hits    Misses BioR Hits    Misses BioW Hits    Misses
     1439        12       960         0         0         0         0         0
BioRLHits    Misses BioD Hits    Misses DirE Hits    Misses
        1         0         4         0         1         0

Thanks for the help, guys.
Received on Fri Nov 25 2016 - 20:42:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:08 UTC