Subject: Re: 3ware RAID controller slow?
To: None <jmarin@embedtronics.fi>
From: Johan A.van Zanten <johan@giantfoo.org>
List: netbsd-users
Date: 10/27/2007 15:42:03
Jukka Marin <jmarin@embedtronics.fi> wrote:
> On Sat, Oct 27, 2007 at 09:40:38AM -0500, Peter Eisch wrote:
> > > Question: Why is RAID5 this slow?  Is it a NetBSD problem (in the twa driver,
> > > for example) or is this how RAID5 performs?
> > 
> > But I am running netbsd-3-1 with an MPBIOS kernel.  I can support I/O in
> > excess of 30MB/s sustained. 
> 
> If I "dd if=/dev/zero of=foo bs=10m count=1000", I get over 140 MB/s write
> speeds - but if I untar pkgsrc, performance collapses.  I would be pretty
> happy with 140 MB/s, but below 1 MB/s is not acceptable for a server.  Not
> even for my server. ;)


The larger transfer units (bs=10m) are dramtically improving your
performance with dd.

I think the default block size (AKA "blocking factor") for tar is 20
512-byte blocks, so that's 10 KB transfer unit.  That's less than 1/1000th
the unit in the dd command you are using.

 You can adjust this with the "-b" flag to tar, but i think largest i've
been able to use is 63.

 From tar(1):


     -b blocking factor, --block-size blocking factor
                   Set blocking factor to use for the archive.  tar uses 512
                   byte blocks.  The default is 20, the maximum is 126.  Ar-
                   chives with a blocking factor larger 63 violate the POSIX
                   standard and will not be portable to all systems.


 I'm not saying this is the only problem, but it does explain part of it.

 It'd be interesting to see how "dd if=/dev/zero of=foo bs=10k count=1000" 
performs.


 -johan