🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #18098

Re: Tips for tuning disks on news server w/ Ultra-2 & hardware RAID?

#18098
From: Joe Greco
Date: Thu, 29 May 1997 00:00
135 lines
7411 bytes
In news.software.nntp article <338c529c.0@news3.ais.net>, rjoyner@ais.net wrote:
:Joe Greco wrote:
:
:> :If this was an Oracle database, I'd say stick with 64k stripes, but for
:> :lots of really small file transactions, 64k will choke you.  8k is much
:> :better.
:> 
:> Why do you say this?  What's the theory?  If you have 64k stripes, and
:> lots of small, random transactions, they should still be randomly spread
:> out over all the disks.  What you DON'T want is for a single transaction
:> to overlap and involve multiple disks.  That doesn't seem likely, at
:> first, even with a small stripe size, but then if you start to consider
:> second order effects (such as looking up the filename in the directory,
:> i.e. the last iteration of namei), then you have discovered a reason to
:> use a larger stripe size.
: 
:I say that because, as I understand it, even if you don't have 64k worth
:of stuff to write, it will still write a 64k stripe, thus wasting time.
:These units do have a write-gathering cache, but still...
:You take a performance penalty on the reads too, no?  Reading 64k just
:to
:get 8k worth of data seems like a waste as well.  I've seen the numbers
:from MTI's engineers that tend to support this theory.

Oh. ...  no.. no... nononono!!!

That's 65536 _disk blocks_ per stripe.  You should be able to read and
write any arbitrary 512 byte sector(/block) independently.

Some RAID mfr's allow the underlying medium be reformatted with varying
block/"stripe"/unit sizes - that is NOT what I am talking about.  If
your RAID does that, you definitely want to shut it off.  Most of the
traditional "RAID optimizations" fail miserably on a news spool, due to
the very small bursts of writes that news tends to want to do all over
the place.  RAID arrays have always suffered from that problem - its
one reason that standard advice is to turn off atime updates on a RAID5
filesystem if your OS allows it and you don't need atime updates.

My whole news spool argument revolves around a concept of increasing
concurrency while simultaneously increasing the chance of locality of
reference benefits. 

1) There is really no way to speed up a single article read (i.e. on an
   idle spool).  Drives move at a particular speed, and on average, it's
   going to take a particular amount of time to seek from one arbitrary
   location on the disk to another.  I argue, in particular, that a RAID
   array fetching an article can not be faster than a single component
   drive of that array.

   This does not take into account any caching effects, etc., as I am
   trying to demonstrate worst case behaviour.  Caching can happen on
   the drive itself, a RAID controller, a caching SCSI controller, or
   OS caching.  I assume that all of these are possible, of course.

   This is a key argument, and may take some thinking about in order
   to understand.  

2) If we accept #1, then it becomes clear that there is no point in
   involving more than one disk mechanism in a particular access, as
   it has no (average) speed advantage.  However, if we have multiple
   mechanisms, we can try to optimize events so that several events
   are being processed concurrently.  This yields an average performance
   increase in terms of transactions per second:  given a sufficient
   number of events per second, performance theoretically increases
   linearly with the number of mechanisms we have.

3) If we accept #2, we now try to figure out how to implement it.
   In a scenario with static readonly data, one would simply copy the
   disk N times, and the problem would be solved.  However, this would
   incur a write penalty....  :-)

The compromise is a leap of imagination that ends up with us trying to
leverage off of FFS algorithmic behaviours to evenly distribute accesses
between disks.  By choosing a relatively large interleave or stripe size,
one can cause all disk blocks in a given cylinder group to be on one
particular drive.  That seems obvious, but the implications are not
(maybe).

Now if you go re-read what I said before, it might make more sense.

:> It will not only NOT "choke you", it will actually increase concurrency
:> in your I/O system.  You will go... faster!
:> 
:> :I also run RAID-5 instead of RAID-0.
:> 
:> Ewww.  You are eating a penalty for updating both the parity AND the data,
:> rather than just updating the data.  Of course, you gain reliability, but
:> I would probably prefer to spend the money and mirror, so that there is no
:> performance penalty.
:
:Well..given the propensity for disks to fail, and the overhead for
:mirroring
:software (ODS? Ick!), it seems like a small price to pay.  At least the
:parity is striped too.  RAID-3 would REALLY suck in this case.

Hardware mirroring is fast.  At least if done right, it should be a few
percent slower for writes (theoretically just as fast), and up to twice
as fast for reads (a bit less in practice).  Software mirroring
{c,sh}ould be just about as fast too.  That does not imply that ODS is.

:> RAID5 for small transactions sucks.  Of course, throw enough disks and
:> money at it, and it will perform reasonably well.
: 
:That's the whole reason for write / read caching.

Uh, yes, if you're writing lots of continuously streaming data.  On the
other hand, if you have a five disk RAID5, and you wish to update a single
block, you end up involving several drive mechanisms and your caching only
marginally pays off because you're having to cache multiple blocks to be
written back instead of just one.  That's fine - but it's inefficient when 
you consider that you could have made better use of the resources.

As I said, throw enough money at it, and it will perform reasonably well.
Meanwhile I'll set up a nice little array of disks that will go faster,
without the expense of the fancy RAID hardware.  :-)  I've been using
ST-31055N's for news, if you have two dozen of them, that means that
you have 12MB of cache, without spending any money on RAID at all...

:> :I currently use one of MTI's RAIDs on my news relay.  It pumps out over
:> :35 GB of traffic per day, and I have yet to see the first RAID
:> :bottleneck.
:> 
:> I currently don't bother with RAID because I can design a better I/O
:> system based on theory of operation.  I have yet to see the first
:> disk system bottleneck too...  :-)  (40+ articles/sec, not using CNFS).
:> 
:Glad you've got it working so well.
:
:I doubt I'd use RAID either if I had a LVM (Logical Volume Manager) a-la 
:IBM on my Sun.  Now *that* would be cool!



Technical Details
Message-ID: <5mj534$b0v$1@earth.execpc.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <82yb90mf99.fsf@peachfuzz.eecs.umich.edu> <5mgfsf$iqc@nntp0.riverside.il.ameritech.net> <5mhitu$7sh$1@earth.execpc.com> <338c529c.0@news3.ais.net>

Show Full Headers
Complete Article Headers
Message-ID: <5mj534$b0v$1@earth.execpc.com>
Subject: Re: Tips for tuning disks on news server w/ Ultra-2 & hardware RAID?
Date: Thu, 29 May 1997 00:00:00 +0000
From: jgreco@ns.sol.net (Joe Greco)
References: <82yb90mf99.fsf@peachfuzz.eecs.umich.edu> <5mgfsf$iqc@nntp0.riverside.il.ameritech.net> <5mhitu$7sh$1@earth.execpc.com> <338c529c.0@news3.ais.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 244656043
Sender: jgreco@earth.execpc.com
Organization: sol.net Network Services - Milwaukee, WI
Newsgroups: news.software.nntp