[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Stuff from /bin, /sbin, /lib depending on /usr/lib libraries



On Sat, Sep 01, 2012 at 02:29:20AM +0800, Thomas Goirand wrote:
> On 08/31/2012 11:52 PM, Peter Samuelson wrote:
> > I guess I can understand that you want your /usr to be resizeable
> 
> Not only this. I want it on a RAID10 or RAID5 which goes faster than
> my / that is hosted in a slower RAID1.

Okay, this is where you stopped making sense.

RAID1 is *not* slower than RAID5. On the contrary. Think about it:

To write something to RAID1, you need to duplicate your stripes to the
amount of disks you're writing, and just write. It's slower than
single-disk or RAID0 performance (since you need to write more than
once), but other than that you're fine.

In contrast, for every stripe you need to write to RAID5, you need to
- Read all the stripes in a stripe set
- Replace (in memory) the stripe that's being overwritten with the new
  data
- Compute the new checksum
- Write out the new checksum and data stripe

The first step can be skipped if the stripe set you need to write to
just happens to be in cache still, but that certainly isn't always the
case (that's why it's called a cache). That also doesn't rule out the
CPU-intensive third step.

If you're doing two-disk RAID1, you're also writing two stripes, but you
don't have to do the first three steps. So for RAID1, you only need to
do the last step. By definition, if you have less work you're going to
be faster.

On read, the RAID implementation can choose which disk to use based on
what its optimization algorithms think is the best option. This means
you'll also get better read performance than with RAID5, where you need
to read the stripe off the disk where it's been written. If you need two
stripes at any particular time with RAID1, you can ask one stripe from
one disk, and the other stripe from another disk in the RAID set. If you
need two stripes at any particular time with RAID5, you need to read
them where they're stored -- and if they happen to be on the same disk,
your performance suffers.

Now it's true that hardware RAID can optimize much of the performance
issues away, but that doesn't mean RAID1 is slower than RAID5. The only
advantage RAID5 has over RAID1 is that it requires less disks, and so it
may be more economical; but speed has nothing to do with it.

-- 
The volume of a pizza of thickness a and radius z can be described by
the following formula:

pi zz a

Attachment: signature.asc
Description: Digital signature


Reply to: