-4

Is it possible, or feasible, or even sensible to consider hardware acceleration for MD RAID?

I am referring more here to RAID6 type levels where there is a computation overhead. My thinking is that it is still disks that will provide the greater bottleneck, but I am surmising.

As has been pointed out in the answers, this should simply mean getting a hardware RAID card. The advantage of MD over hardware is to avoid the need for hardware of course - it is software RAID. However, another advantage of MD is avoiding vendor lock-in. My understanding is that you cannot move disk sets between different hardware RAID vendor products and have any hope they will work without starting over. Whereas with MD you can move disks between machines without issue.

Having hardware that can boost the performance of MD RAID without having to resort to a wipe, rebuild and restore would be beneficial in some cases.

Paul
  • 1,288
  • 13
  • 25
  • 1
    Yes, a hardware RAID controller... But really, the CPU available to MD is probably more powerful than what's embedded on a hardware controller. What's the problem you're experiencing? – ewwhite Jul 18 '13 at 13:30
  • Thanks for your answer below, but it is answering a comment rather than the question. I have deleted the comment to avoid confusing things further. I don't have a specific issue, other than I want to understand whether when still using MD if offloading the RAID6 computation to dedicated hardware would be beneficial or possible. – Paul Jul 18 '13 at 21:55
  • 1
    You are asking for a hardware RAID controller. *"Offloading RAID computation to dedicated hardware"* is 90% of the way towards a hardware RAID controller. – ewwhite Jul 18 '13 at 22:18
  • Yes but I am specifically asking for soemthing that works work with MD disks - is there such a thing? – Paul Jul 18 '13 at 22:19
  • The answer here is surely that you're doing it wrong and your reasoning is wrong. If your data is important and your MD isn't hacking it then the simple solution is go hardware, anything else is just a hack. – user9517 Jan 06 '14 at 08:12
  • @Iain I think you may have misunderstood the question. It is simply asking if the RAID6 computation in MD can be accelerated in hardware. There is no part of this question that asks whether MD RAID or hardware raid is a "better" option in any scenario. – Paul Jan 06 '14 at 09:03
  • Not sure why there's so much negativity and downvotes for this. There are plenty of cases where mdraid works but a hardware RAID controller won't. (e.g. memory disks; sd cards when the question was first written. Now we have NVMe drives, which have minimal HW RAID controller support.) A valid question was asked, and despite the practicality, it deserves an answer on the merits. (N.B. To reduce confusion, I am a different Paul, not the original person who posted the question!) – Paul Aug 25 '23 at 15:37
  • There are a couple options I know of that are technically software raid and use hardware accelerators, but they're not md raid so putting them here instead of as an answer. One is GRAID, which uses a GPU to handle the processing. It can do extremely high speeds of erasure coding for many devices, e.g. for driving NVMe drives at close to their native speed. Another is RAIDIX, which is software RAID but uses GPU vector instructions to accelerate the erasure coding. Both are proprietary products. (N.B. I am a different Paul than the one who asked the question.) – Paul Aug 25 '23 at 15:54

5 Answers5

7

Your problem with high I/O wait on writes is that you have no write cache. Software RAID really doesn't offer that, whereas a hardware RAID controller has a battery-backed (BBWC) or flash-backed (FBWC) cache module to buffer incoming writes. The writes go to DRAM and are flushed to disk later, reducing write latency. In this case, your writes incur the disk pool's latency.

ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • Thanks - this doesn't answer the question asked - please use the comments section for responding to comments. – Paul Jul 18 '13 at 21:48
  • 2
    @Paul Dude, this is addressing your *problem* of low write speed, not your misguided question about software and hardware RAID functionality. Ungrateful. – ewwhite Jul 18 '13 at 22:13
  • I am grateful for the answer, and thanked you. It doesn't address the question is all I am saying. – Paul Jul 18 '13 at 22:18
6

Sorry, are you really asking if there's a hardware version of software RAID? well...yes, it's called hardware RAID.

Chopper3
  • 101,299
  • 9
  • 108
  • 239
  • I was under the impression that there wasn't a hardware implementation of RAID that was compatible with MDADM. – Paul Jul 18 '13 at 13:47
  • Define compatible? – Chopper3 Jul 18 '13 at 13:51
  • I have written several replies to this and deleted them, because I am not sure what aspect of "compatible" is unclear here. Could you elaborate? – Paul Jul 18 '13 at 13:57
  • Maybe your question could be clearer - are you asking for something in hardware that will do the same as MDADM or are you asking for a bit of hardware that does part of the functionality of what MDADM does and if so which parts? Hardware RAID can, as far as I'm aware, entirely replace MDADM's functionality, so that would answer the first but we'd need to know what you would want the hardware to do in conjunction with MDADM to fully understand your question. – Chopper3 Jul 18 '13 at 14:01
  • The question asks whether it is possible to hardware accelerate MDADM, particularly the computation overhead of RAID6. Not "is there a hardware RAID implementation that I can use instead of md?". I can see the question is being misinterpreted but I really can't see why. – Paul Jul 18 '13 at 21:52
  • Well thanks for the clarification but I'm almost 100% certain that there's no hardware out there that JUST does the RAID math. The reason being that if someone wanted to make such a device they'd be engineering about 50-75% of what was needed for a full hardware RAID controller, that does everything MDADM does, and there's a market for those, a big one. And that gets to the crux of my earlier confusion; I've never heard of a requirement to do just a part of the RAID work before, there is no market for such a device, you're unique in this requirement. Does that make sense? – Chopper3 Jul 19 '13 at 06:54
  • It makes total sense - too niche. Though I am not convinced that a hardware raid controller that could work directly with md disks wouldn't be a bad idea. – Paul Jul 19 '13 at 10:38
  • I'm not saying it's a bad idea, just a rare/unique one - partial hardware acceleration essentially. Generally people like the cheapness/flexibility of SW RAID **or** the performance of HW RAID - you seem to want a bit of both I guess. That said I really do think you just need a HW controller to be honest, there are few downsides other than cost. – Chopper3 Jul 19 '13 at 11:01
  • Oh yeah, I agree, I do need one. I just want one that I can plug my disks into and have them work without rebuilding and restoring. – Paul Jul 19 '13 at 12:21
  • Oh I see...hmmmm...well obviously you could plug them into some controllers and they shouldn't be too differently presented to the OS, it's break the array but you could rebuild it once the second disk was added. But at that point it'd just be acting as a dumb array, MSADM would still be doing all the work - which brings us to you question I suppose. Interesting. I'm a bit spoiled in that I always go with HW RAID from day one but obviously there's a budgetary impact with that. – Chopper3 Jul 19 '13 at 14:21
  • Plus enough infrastructure that taking down a storage array to migrate it to another platform isn't going to have an impact. My question was meant to be general, but this instance is RAID6, so several terabytes to be restored once the array is established, which in itself would take a long time. – Paul Jul 20 '13 at 12:51
4

Short answer: No.

If you're thinking "hardware acceleration", you're thinking hardware RAID with a suitable controller w/battery-backed flash.

MDADM is considered something to be used if you either can't afford to have a RAID controller that suits your needs (or has enough channels, for example) or you can't feasibly stuff one in the box itself which is the case with say, your average desktop. Yes, desktops can have hardware RAID too, but MDADM is designed for retro-fitting RAID on hardware without support otherwise.

So, if you want faster RAID, get a card. There is no purpose on putting a hardware RAID card on top of MDADM.

Nathan C
  • 15,059
  • 4
  • 43
  • 62
  • 1
    The other advantage of MD is to avoid vendor lock-in - so it seemed to me a hardware implementation of MD would have some benefit. – Paul Jul 18 '13 at 22:31
  • There's no such thing. MD is software RAID - that's it. There's no hardware acceleration. – Nathan C Jul 18 '13 at 22:46
2

Some Linux-powered NAS systems offering software RAID include hardware to accelerate RAID5 and RAID6 operations. For example, several low-power NAS devices running on older ARM System-on-Chips made by Marvell come with the "Marvell XOR engine" which provides hardware offload of XOR operations.

From the Linux mail archives:

The XOR engine can be used by DMA engine clients implemented in the kernel, one of those clients is the RAID module. in that case, I observed 20% improvement in the raid5 writes throughput, and 40% decrease in the CPU utilization when doing array construction, those results performed on 5182 running at 500Mhz.

Newer devices with Marvell SoCs include a new hardware block that also offers hardware acceleration of RAID6 operations.

Emilio
  • 21
  • 2
1

The referenced document outlines a method of using a general purpose GPU accelerator to increase the performance of RAID systems, by using it to carry out parity calculations.

If a driver was written for MD that could use OpenCL / CUDA, then it could potentially increase the performance of software RAID by an order of magnitude.

So the answer is yes, it is feasible.

Link

Glorfindel
  • 1,213
  • 4
  • 15
  • 22
Paul
  • 1,288
  • 13
  • 25
  • Honestly quoting something from IEEE doesn't mean much - there's plenty of "theory" but there's no product out that will accomplish this. – Nathan C Jan 06 '14 at 15:30
  • @NathanC Feasibility does not imply a product exists. Generally it is taken to mean the opposite. – Paul Jan 06 '14 at 21:21