I have a couple of ubuntu servers on a virtual environment (Ubuntu 16.04 + 22.04 on vmware). There is a NFS Mount to a NFS Share which is in a different Network. Now if i execute any command to this NFS Share (find /var/tmp/test001 -type f) or "(tar -czf /var/tmp/test001/test001.tar /var/tmp/test001/subdirectory) the time it takes to execute the command varries for the same command.
For example, first time it is fast. Then it is slow. Then it is faster again.
It seems to be related to the number of rpc calls made which i can observe with "nfsstats -Z" while executing the command.
Example:
1 minute for 50'000 rpc calls
2 minute for 100'000 rpc calls
30 second for 25'000 rpc calls
This is the NFS4 mount:
1.2.3.4:/path_to/remote_nfs001 on /var/tmp/test001 type nfs4 (rw,relatime,vers=4.0,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=2.3.4.5,local_lock=none,addr=1.2.3.4)
NFS Client Version:
/sbin/mount.nfs4 -V
mount.nfs4: (linux nfs-utils 2.6.1)
Do you know why there is a difference in the number of prc calls made for the same command? I also observed if it's related to the type of call (getattr, readdir, open, close) But this does not indicate any influence. The relation for time is the number of calls. The same observation is also made if i use tcpdump to check the packets. There you also see the different number of calls each time.
On the NFS share there are a lot of folders and around 15'000 Files