Subject: Solved. Re: NetBSD-1.5 and NFS - any suggestions?
To: None <netbsd-users@netbsd.org>
From: Artem Belevich <art@riverstonenet.com>
List: netbsd-users
Date: 02/05/2002 11:30:50
Hi,

Thanks to Frank van der Linden and other folks who helped me to find
solution to the issues I had with NFS on NetBSD-stable. Here are the
results that may be helpful to people who experience similar issues.

There basically were two problems (all in 1.5.3_ALPHA):
a) Periodic box lockups 
b) Bad NFS performance

Lockups:

Symptom: periodic box lockups ranging from several seconds up to
	 several minutes. Box is ping-able but that's the only sign of
	 life.

Analysis: cache_purgevfs() in kern/vfs_cache.c was the reason for
	  lockups, probably due to inefficient algorithm (O(n^2) in
	  -stable). 

Solution: The problem was solved in r1.27 of kern/vfs_cache.c that
	  didn't make it into the 1.5-stable. Hopefully it will be
	  pulled in soon. Meanwhile you can apply the diff manually.
	  # cd /usr/src/sys/kern; cvs diff -r1.26 -r1.27 vfs_cache.c|patch

----------------------------------------------------------------
NFS performance (or lack of it):

Symptom: Builds in a NFS-mounted directory are *very* slow.

Analysis: tcpdump shows that despite the fact that NFS reply arrives
          ~120us after request was sent the box sends out next NFS
          request only 10ms later which suggests that the process that
          was doing NFS operation does not wake up upon NFS reply
          arrival and gets control only when next timer tick
          happens. Why that happens is unclear. -current does not have
          this issue.

Workaround: cranking up HZ to 1KHz did improve NFS performance
	  tremendously. It also screwed up NTP as the timer errors
	  started to accumulate too fast and ntpd doesn't handle that
	  too well. But I can live with that for now.

Just my $0.02.

--Artem