#702477 nfs-common: client-side directory walk performance degradaton

#702477#5
Date:
2013-03-07 01:12:08 UTC
From:
To:
I believe there is performance degradation in NFS4 client:

	sudo mount -t nfs4 debmain:/tmp /mnt/tmp

	/usr/bin/time -p sh -c 'tree /mnt/tmp | tail -1'

287 directories, 63315 files
real 4.22
user 1.32
sys 1.04

When

	/usr/bin/time -p sh -c 'tree /mnt/tmp | tail -1'

is repeated several seconds later the output is this:

287 directories, 63315 files
real 24.64
user 1.58
sys 3.42

I tracked it down to "acregmin" NFS mount option: when "acregmin" is
over/expired directory walk becomes ~5 times slower in my case.

Setting "acregmin=120" on mount will delay the problem for exactly 120
seconds: `tree` will walk directory structure in less than 4 seconds within 2
minutes after first walk, then 120 seconds later it slows down to >24 seconds
needed to walk the same tree again.

Setting "acregmin=0" makes directory walk time >24 seconds even for the first
walk.

Cheers,
 Dmitry Smirnov
 GPG key : 4096R/53968D1B
--- Package information. --- Depends (Version) | Installed =========================================-+-=================== libc6 (>= 2.3) | 2.13-38 libcap2 (>= 2.10) | 1:2.22-1.2 libcomerr2 (>= 1.01) | 1.42.5-1 libdevmapper1.02.1 (>= 2:1.02.20) | 2:1.02.74-6 libevent-2.0-5 (>= 2.0.10-stable) | 2.0.19-stable-3 libgssglue1 | 0.4-2 libk5crypto3 (>= 1.6.dfsg.2) | 1.10.1+dfsg-4 libkeyutils1 | 1.5.5-3 libkrb5-3 (>= 1.6.dfsg.2) | 1.10.1+dfsg-4 libmount1 (>= 2.19.1) | 2.20.1-5.3 libnfsidmap2 | 0.25-4 libtirpc1 | 0.2.2-5 libwrap0 (>= 7.6-4~) | 7.6.q-24 rpcbind | 0.2.0-8 adduser | 3.113+nmu3 ucf | 3.0025+nmu3 lsb-base (>= 1.3-9ubuntu3) | 4.1+Debian8 initscripts (>= 2.88dsf-13.3) | 2.88dsf-41 libblkid1 (>= 2.16) | 2.20.1-5.3 libc6 (>= 2.3) | 2.13-38 libtirpc1 | 0.2.2-5 libwrap0 (>= 7.6-4~) | 7.6.q-24 nfs-common (= 1:1.2.6-3) | 1:1.2.6-3 ucf | 3.0025+nmu3 lsb-base (>= 1.3-9ubuntu3) | 4.1+Debian8 Recommends (Version) | Installed =========================-+-=========== python | 2.7.3-4 Suggests (Version) | Installed =========================-+-=========== open-iscsi | watchdog |
#702477#16
Date:
2013-03-08 03:03:57 UTC
From:
To:
I found that dropping dentries and inode caches with

	sudo su -c 'echo 2 > /proc/sys/vm/drop_caches'

is helpful to avoid performance degradation if given before each tree walk
probably because it drops nfs_inode_cache.
However I don't understand why dropping pagecache by

	sudo su -c 'echo 1 > /proc/sys/vm/drop_caches'

helps in this situation as well...

#702477#25
Date:
2013-03-08 22:47:02 UTC
From:
To:
I couldn't reproduce on latest Squeeze (linux/2.6.32-5) so perhaps it is a
regression...

Regards,
 Dmitry.

#702477#42
Date:
2021-04-24 15:00:54 UTC
From:
To:
Hi

This bug was filed for a very old kernel or the bug is old itself
without resolution.

If you can reproduce it with

- the current version in unstable/testing
- the latest kernel from backports

please reopen the bug, see https://www.debian.org/Bugs/server-control
for details.

Regards,
Salvatore

#702477#45
Date:
2021-04-24 15:00:54 UTC
From:
To:
Hi

This bug was filed for a very old kernel or the bug is old itself
without resolution.

If you can reproduce it with

- the current version in unstable/testing
- the latest kernel from backports

please reopen the bug, see https://www.debian.org/Bugs/server-control
for details.

Regards,
Salvatore