Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: Mdadm .VS hardware RAID

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Detroit
    Posts
    8

    Default Mdadm .VS hardware RAID

    Hello, I'm new here. I'm also curious, which would be faster, hardware raid or mdadm software raid?

    Am I correct in assuming that mdadm puts more strain on your CPU when writing/reading files?

    I think it would be cool if Phoronix wold do some benchmarks

  2. #2
    Join Date
    May 2007
    Location
    Third Rock from the Sun
    Posts
    6,587

    Default

    Hardware raid is a hell of a lot faster as long as you are talking about a real raid controller.

  3. #3
    Join Date
    Jan 2008
    Posts
    772

    Default

    I don't have any direct experience, but this is what I've heard: with a small array, under low load, with a modern x86 CPU (typical desktop use), softraid is usually faster; that is, a given request will probably get the data to its destination in less time. Of course, this is at the cost of CPU utilization. As you start looking at performance under load and with larger arrays (e.g. server situations), hardware RAID can start pulling ahead because it's not bottlenecked by contention for the CPU.

    Anyway, I think the main reason that "real" RAID cards fetch so much money is that they offer features like hot-swapping and online array rebuilding in a way that allows replacement of a dead drive with zero downtime.

  4. #4
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    1,753

    Default

    Yeah, it's not as much about speed as to data reliability. If an OS hangs, it'll affect software RAID since it's run on CPU but should be fine with a separate RAID controller.

  5. #5
    Join Date
    Sep 2009
    Location
    Detroit
    Posts
    8

    Default

    Quote Originally Posted by nanonyme View Post
    Yeah, it's not as much about speed as to data reliability. If an OS hangs, it'll affect software RAID since it's run on CPU but should be fine with a separate RAID controller.
    Well if your OS hangs, aren't you pretty much screwed anyways?

    Or do you mean that the current read/writes to the array would be able to finish?

  6. #6
    Join Date
    May 2009
    Posts
    49

    Default

    Software raid can NEVER be *faster* (it is at best AS fast for stupid raid types, like striping) than hardware raid unless those who implemented the hardware raid were a bunch of rabid chimps on acid. Any kind of parity-raid (raid 5, 6, etc.) will ALWAYS be slower in software raid than in hardware raid, especially when the host CPU is under load.

    Hardware raid does NOT give you any hotswap and/or online array rebuilding that doesn't ALSO exist within mdraid. Yes, mdraid is happy to allow you to add/remove volumes from the array and/or rebuild the array entirely online with no downtime just like hardware raid.

    The advantage of hardware raid is performance, plain and simple. The advantage of software raid is portability (i.e., you can plug your disks into ANY controller and access your array rather than being stuck buying a new card if the card burns out), and cost (i.e., you don't need to buy a raid card for software raid).

    FAKERAID (which is a hardware device that pretends to be hardware raid when the raid function is actually entirely within software) is complete crap. It not fast, portable, OR cheap.

  7. #7
    Join Date
    Jan 2008
    Posts
    772

    Default

    Quote Originally Posted by lbcoder View Post
    Software raid can NEVER be *faster* (it is at best AS fast for stupid raid types, like striping) than hardware raid unless those who implemented the hardware raid were a bunch of rabid chimps on acid.
    Why? All hardware RAID cards I've looked at are doing a substantial amount of their work in software on a general-purpose microprocessor that's a good deal slower than modern desktop CPUs (which makes sense if you think about the engineering constraints). Of course the implementation is thoroughly optimized for running a RAID array, but I don't think it follows that this must be faster than software RAID in all situations.

    Hardware raid does NOT give you any hotswap and/or online array rebuilding that doesn't ALSO exist within mdraid. Yes, mdraid is happy to allow you to add/remove volumes from the array and/or rebuild the array entirely online with no downtime just like hardware raid.
    I guess I could have worded that part better. My point is that if you get a hardware RAID card, those features are advertised and supported by the hardware vendor. You can of course get a cheap hotswap-capable controller card and run mdraid on that, but realistically it's probably going to be untested and unsupported unless you're buying it in a preassembled NAS or something like that.

  8. #8
    Join Date
    Apr 2008
    Posts
    325

    Default

    Quote Originally Posted by lbcoder View Post
    Software raid can NEVER be *faster* (it is at best AS fast for stupid raid types, like striping) than hardware raid unless those who implemented the hardware raid were a bunch of rabid chimps on acid. Any kind of parity-raid (raid 5, 6, etc.) will ALWAYS be slower in software raid than in hardware raid, especially when the host CPU is under load.
    Define faster. Are you talking bandwidth or latency? I can see software raid on a lightly loaded system taking even the best hardware raid to the cleaners for latency, because it's is one less layer of indirection to get to the data.

  9. #9
    Join Date
    Nov 2007
    Posts
    1,353

    Default

    Quote Originally Posted by lbcoder View Post
    Software raid can NEVER be *faster* (it is at best AS fast for stupid raid types, like striping) than hardware raid unless those who implemented the hardware raid were a bunch of rabid chimps on acid. Any kind of parity-raid (raid 5, 6, etc.) will ALWAYS be slower in software raid than in hardware raid, especially when the host CPU is under load.
    I think I may have to disagree with you on this one. I know for a fact that my CPU is a hell of a lot faster than pretty much every areca board I've used.

  10. #10
    Join Date
    Aug 2009
    Location
    Albuquerque NM USA
    Posts
    42

    Default

    Quote Originally Posted by lbcoder View Post
    The advantage of software raid is portability (i.e., you can plug your disks into ANY controller and access your array rather than being stuck buying a new card if the card burns out), and cost (i.e., you don't need to buy a raid card for software raid).
    ..and flexibility. At least with the hardware RAIDs I've played with (though it's been a long time since my Adaptec-worshipping days ;-), you could only work with whole disks. /sda+/sdb+/sdc combined to only one of RAID0|RAID1|RAID5 and that was that. Software RAID lets you have /sda1+/sdb1+/sdc1 be a RAID1 root, with /sda2+/sdb2+/sbc2 being a RAID0 /tmp and /sda3+/sdb3+/sdc3 as RAID5 /home, etc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •