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

Re: Software vs Hardware RAID 10?



Neil Gunton <neil@nilspace.com> writes:

> I'm curious as to whether anyone has experience of software RAID in
> Linux giving better overall performance on RAID10 than a RAID card
> such as the Adaptec 2015S.

I've tested a few raid setups in linux and the results are different
from what you might expect. Changing hardware can impact your results
a lot. So software raid can surprise you just as well as hardware
raid.

The ultimate answere is therefore: TEST YOURSELF.


Anyway, some things I noticed:

Raid 0:
  This seems to work pretty well and as expected. Read and writes are
  spread over the disks and with the right read ahead you get great
  performance. Raid0 is so simple so that is not surprising.

Raid 1:
  There is a "bug" in recent linux kernels with raid1 regarding read
  scheduling. Before when multiple read requests where made to a raid1
  device the kernel would distribute them across both disks giving you
  double the read speed to a single request. But something is broken
  and that no longer happens. Read and write from7to raid1 is now both
  the same (slow) speed.

Raid 5:
  At home something is broken there too. I get less performance from
  my raid5 than form any one disk in the raid5. With older kernel and
  different controlers I remember getting far more speed. I'm not sure
  if it is the controler or if this is releated to the raid1 "bug".
  Hopefully this is specific to my setup or temporary.

Raid 10:

  Here I mean Linux raid10, not 1+0 or 0+1. Linux has a special raid10
  module that is more flexible than running raid0 on top of raid1 (or
  vice versa). Raid10 can handle X disks with Y copies of each data
  block where X >= Y. Note that Y can be anything and does not need to
  be a factor of X. For example you can have 3 disks with 2 copies
  giving you 1.5 disks space. Raid10 also allows for different layouts
  of the copies:

  Near copies:
    Near copies tries to keep the copies within the same stripe or the
    next. This is what traditional raid1+0 looks like. Speed is as one
    might expect just like raid 0+1. So you get 50% of the aggregated
    speed for both read and write.

  Offset copies:
    Offset copies write one complete stripe of data and then write
    copies of that stripe rotated by one device each. You might expect
    that now reading would use all disks in parallel and get twice the
    read speed compared to write. But, I suspect due to the seeking
    over the copies, you actually get less speed than near copies.

  Far copies:
    Far copies is similar to offset copies but the offset is LARGE. So
    you have a stripe at the beginning of the drives and its copy will
    be in the second half of the drives. That means that writes will
    have to seek over half the disk every time. Sounds slow, doesn't
    it. For small files it probably is. But if you run a dd, bonnie or
    iozone test there seems to be no impact from this. In fact write
    speed surpases that of near copies slightly. And reading is as
    fast as a raid0, twice as fast as the other choices.

    You can think of far copies as having 2 partitions per disk,
    running a raid1 between the first partition of each disk with the
    second partition of another disk and then running raid0 over that.

MfG
        Goswin



Reply to: