Subject: Poor disk performance
To: None <netbsd-help@netbsd.org>
From: =?ISO-8859-1?Q?Ari_Sovij=E4rvi?= <apz-list@2304.org>
List: netbsd-help
Date: 05/04/2005 08:52:49
Hi!

I have two nearly identical systems with NetBSD 2.0.2 installed. They're both 
VIA Epia-CL based with 1000MHz C3 CPU. I've build both systems with the same 
kernel config and with identical settings.

Their differences are:

Machine      Pi            S2
RAM          512M          256M
HDDs         80GB 7200RPM  40GB 5400RPM

The problem is that S2's disk performance is a lot slower than Pi's. 
Naturally there must be some performance penalty for having 5400RPM drives, but 
the outcome is that Pi seems to be over 10 times faster at disk IO. They both 
have RAID1 root with RAIDframe and follow the "only one device per bus"-rule.

My initial conclusion was, that I've done some kind of a newbie mistake. Maybe 
IDE DMA turned off or something. However they both indicate that DMA is used:

wd0(viaide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA 
data transfers)

Comparing their dmesgs didn't show anything out of ordinary. The only 
differences were their NIC's hardware address and the size of memory and HDDs. 
I then compared their filesystem settings; both had filesystems created with 
default settings and I couldn't find anything wrong with them. They use FFS 
without soft depencies.

Here's what Bonnie++ says:

Pi:
        ------Sequential Output------ --Sequential Input- --Random-
        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
   Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
   300M 21850  91 35234  35 33140  40 17886  98 142260  99 14137  98
        ------Sequential Create------ --------Random Create--------
        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
     16   328  72 +++++ +++  1750  32   335  73   583  99   756  62

S2:
        ------Sequential Output------ --Sequential Input- --Random-
        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
   Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
   300M 19864  83 38410  40  8240  13 10866  63 26181  26 236.5   3
        ------Sequential Create------ --------Random Create--------
        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
     16    25   6 +++++ +++  2011  38    25   6   545  99   548  48

Just look at the random seeks and random create values. No wonder cvs update 
takes forever :)

So, does anyone have any idea about what's going on? Have I missed some 
performance killing thing here?

TIA for your help :)
-- 
Ari Sovijärvi
http://apz.fi/