Subject: Very slow disk.
To: None <netbsd-help@netbsd.org>
From: Richard Rauch <rauch@rice.edu>
List: netbsd-help
Date: 12/29/2001 23:32:28
I have one system that's an Athlon (800MHz) tower.  Another is a plain
Pentium (233MHz) laptop.

I've noticed that starting applications on the Athlon tower seems to take
a long time.  xosview (from pkgsrc) registers anywhere from about 70K to
around 300K of disk activity (it varies up and down) during the long wait
before an application comes up.  (Once the information has come up and is
cached, the next launch of the same application is much faster.)

On the other hand, the *much* slow laptop brings things up in a more
reasonable time frame.

As an example in contrast, starting X on the tower results in a *quite*
slow scroll of the various lines of output.  Meanwhile, starting X via
startx on the laptop zips the output past and then X appears in relatively
little time.


I can think of the following differences:

 * The tower is running 1.5, while the laptop is running 1.5.2.
   But, I seem to recall that the tower didn't behave like this in
   the past...

 * The tower has a much bigger disk, so maybe as packages get updated,
   the libraries get more widely scattered.  (This would not explain
   X taking longer to start, though, since I'm using X as it shipped
   with NetBSD, and until I start manually invoking applications, nothing
   runs that didn't ship with NetBSD---I have oclock, xload, xconsole,
   xterm, and twm as applications.)

   (Well, I *do* build custom kernels, but that shouldn't cause the rest
   of the system disk layout to deteriorate like this.)

 * The tower is running a VIA chipset.

 * The tower has had to reconstruct itself after some unexpected shutdowns
   (and under softdeps, at that).  Would fsck relocate parts of disk
   files, ever?

 * The tower has lots more data on its /usr.  (The laptop only has
   ~4GB of total drive space, with /usr mostly full.  The tower has about
   15GB of space just for /usr, and has about half that in-use at the
   moment.)

I'm pretty skeptical of all of the above (some moreso than others---I seem
to recall the system being snappier at loading stuff in the past, though
that could have been under 1.4.2 or 1.5_ALPHA).  But, those are the
differences that I can think of between the two.  (Oh, and the tower has
been installed with the same OS version for about a year, while the laptop
has only been wiped/installed within the past 4 months.)

I don't think that the system has ever just suddenly got worse.  Although
I haven't had time to use it much this fall, I've never noticed a sharp
decline in performance.  So, I'm more inclined to believe that it has
become progressively slower since the last time it was installed.  (When I
upgraded to 1.5 (proper), I'm pretty sure that I did a total wipe, since I
also took that time to create a GNU/LINUX partition.)

The hardware in the tower has not been replaced/modified since getting it
stably configured about 1.5 years ago.  (When it was new, I was swapping
bits around, for a whle.)


Could softdeps have anything to do with this?  (/usr doesn't contain
anything irreplacable on either system, so I've turned on softdeps on
both.)

Could failing hardware result in poor performance without errors showing
up in dmesg output?


One more bit of info: bonnie++ can cause xosview to register 10 to 20 MB
per unit time.  (Even though loading, say, emacs, only registers ~100K of
disk IO per unit time.)


Any ideas?  Are there known bugs in 1.5 (proper) that would cause this and
which are fixed in more recent versions?  Has anyone else experienced
similar problems?


  ``I probably don't know what I'm talking about.'' --rauch@math.rice.edu