List:General Discussion« Previous MessageNext Message »
From:Per Andreas Buer Date:August 21 2003 9:35pm
Subject:Re: RAID or not?
View as plain text  
SLefevre@stripped (Lefevre, Steven) writes:

> I say go with RAID 5, on a controller card.
> ..
>
> You get better performance than mirroring or regular drive, because
> the data is spread out over your drives. It's not as good as disk
> striping, though.

Ehh. Wrong. That is not how it works. If you have RAID5 with 4 disks, as
we have here, one single write() will have the following effect.

1. The controller will have to read the whole stripe off the array. 3
reads from 3 diffrent discs.
2. Calculate the new checksum for the stripe.
3. Write the modified block back to the disk where it was changed
4. Updated the checksum

This works Ok for multimedia and file storage, where you write()-call
might be the size of a stripe or bigger. Then you can skip phase 1) on
the list above. 

Ask any DBA; they will all tell you to never_ use RAID 5 for databases
with dynamic content. Just don't.

As for performance, seek times tend to be higher on a RAID5 array then
on a mirror. The only thing which is good with RAID5 is read througput -
which might be important for full table scans, but not much else.


> So, all in all, RAID 5 gives fault tolerance and better performance.

Why do you think people use RAID1? 

> You can have the OS do the RAID, but that puts a lot of burden on the
> processor and OS. 

CPU is almost never an issue anymore - not for database servers, anyway.
The increase in CPU-usage is seldom noticable. I've seen software raid
(on Linux 2.4) outrun $2000+ RAID-cards. CPUs are many times faster than
the puny i960 or Strongarm CPU which are put on RAID controllers.

> I recommend getting a RAID card, and not a cheap one, either. Plan on
> spending ~$500.

If you get one. Get one with a battery and write-back cache. They will
give you kick-ass performance for those pesky fsync's.

-- 
Per Andreas Buer
Thread
RAID or not?Jackson Miller21 Aug
  • Re: RAID or not?Jon Drukman21 Aug
    • Re: RAID or not?Jackson Miller21 Aug
      • RE: RAID or not?Steven) (Lefevre21 Aug
        • Re: RAID or not?David Griffiths21 Aug
        • Re: RAID or not?Per Andreas Buer21 Aug
        • Re: RAID or not?Jon Drukman22 Aug
          • Re: RAID or not?Dan Nelson22 Aug
          • RE: RAID or not?Steven) (Lefevre22 Aug
            • RE: RAID or not?Michael Loftis2 Sep
  • Re: RAID or not?Colbey21 Aug
  • Re: RAID or not?Per Andreas Buer21 Aug
RE: RAID or not?Alec.Cawley22 Aug
  • Re: RAID or not?Jim McAtee23 Aug
    • Re: RAID or not?Michael Loftis2 Sep
RE: RAID or not?Alec.Cawley22 Aug
Re: RAID or not?Alec.Cawley26 Aug