# Software RAID vs hardware RAID



## vpsnewb (Mar 25, 2013)

I understand that a lot of people think hardware raid is superior to software raid, but is this still true with the advancements of modern servers? What are the benefits of hardware/software raid?


----------



## HalfEatenPie (Mar 25, 2013)

Well..  Placing my two cents here, my opinions are that it depends on the usage.

For a VPS Company, personally I'd prefer a hardware raid node over a software raid node.  This is because hardware raid cards take care of the raid systems instead of the server itself taking care of it.  While this also includes errors, I believe that when managed and used correctly allows for the server's resources to be used for more important task other than raid.  Some consider this impact neglectable, but I personally believe this is important especially since a VPS node can be used for many different tasks.  

If its a personal node, I'm fine with software node due to the price tag (of free) and easier to maintain (again, due to the fact that it's at the OS level and not hardware level).


----------



## sperryman (Mar 26, 2013)

In my experience, it comes down to performance. When you are using hardware raid, the raid processing is done by a separate hardware device. When you are using motherboard raid or software raid, all the processing is done by the CPU instead; taking away resources from other applications and processes.

I have 2 production servers running a software raid in Ubuntu, but they both just store backup images for a Windows server. If I needed to access data off that server often, I would have run with a hardware raid controller on them. For what it is worth, those two servers have been rock solid with no issues what-so-ever.


----------



## vpsnewb (Mar 26, 2013)

sperryman said:


> In my experience, it comes down to performance. When you are using hardware raid, the raid processing is done by a separate hardware device. When you are using motherboard raid or software raid, all the processing is done by the CPU instead; taking away resources from other applications and processes.
> 
> I have 2 production servers running a software raid in Ubuntu, but they both just store backup images for a Windows server. If I needed to access data off that server often, I would have run with a hardware raid controller on them. For what it is worth, those two servers have been rock solid with no issues what-so-ever.


Couldn't you argue though that the processing power of any modern server-grade CPU will greater than that of whatever comes with your RAID card? Being responsible for server builds is something I've never had to do, thus my experience is minimal, but how much of a hit does software RAID use on a CPU anyhow? Any way to 'cap' or limit the amount of CPU software RAID can consume?

And what about RAM cache? Is this a thing?


----------



## jarland (Apr 11, 2013)

I hear the arguments, I agree that software RAID is fine, especially when using SSD caching. However, I feel that if I were to actually put a software RAID into full production in place of my hardware, I might have a better argument for why I choose hardware. Because I won't, I won't have that opportunity. All too often I see people making seemingly valid arguments to justify their budget corner cutting and later I see them come back with major losses and then they justify it by the price they charge. I've got no one in mind when I say that, it's just a combination of attitudes and actions I've seen from several people. I won't do it. Maybe I'm the dumb one, but boy would I hate to find out that I'm right.


----------



## Nick (May 2, 2013)

Both definitely have their ups and downs, price being the main factor.


For a VPS Node in production, I must say that it's best to fork out that little bit extra to save yourself in the long and there's a few reasons behind this.


Write Back Caching or BBU basically allows pending writes to be saved in case of a power outage (uses a battery).
Disk hot swapping. Again, not possible with Software RAID.
RAID-0 and RAID-1 the performance between the two are negligible however I have noticed performance to drop when using multiple arrarys at the same time which in this case (for VPS Hosting) is generally RAID-10.
*Conclusion:* Don't let the minimal price difference effect your choice when deciding between Software + Hardware RAID for your next dedicated server configuration.


----------



## shovenose (May 13, 2013)

Hardware RAID is:

-Faster

-More Reliable

-A great marketing point.

For a personal project, software RAID is fine. For a VPS node, not so.


----------



## drmike (May 14, 2013)

Hardware RAID costs, especially for these fancy cards many providers tout in their sales BS.

Software RAID fine for most folks, especially for your own PC.

Provider land, that's hardware RAID no doubt.


----------



## bfj (May 15, 2013)

I use mdadm for my Media Server PC, it runs 3x2TB and 3x3TB just fine, I get about 64MBps read/write on it. It is running on an old P4 I had, and the SATA drives are also running over a PCI card (Which is a hardware raid card but I opted for mdadm).

For personal reasons like that, I see no real reason to use a hardware raid. I mainly went mdadm because if those raid cards failed, I am worried I would not be able to find another one (that and I had no money to spend on a spare raid card). 

So yea. For production type environment, where I would have the money I would do hardware raid.


----------



## Ash (May 16, 2013)

It all depends on the work load really. We have some SW RAID10 nodes that work a charm, but then others cause serious load problems when there are a lot of disk read/writes.

The other PITA with SW RAID is the weekly resync on a Sunday evening!


----------



## BradND (May 16, 2013)

We use hardware raid with everything, the performance benefits are too good to pass up and controllers are cheap.

We experimented using KVM and software raid and the I/O results were abysmal.



GetKVM_Ash said:


> The other PITA with SW RAID is the weekly resync on a Sunday evening!


Remove the cron?


----------



## Ash (May 16, 2013)

BradND said:


> We use hardware raid with everything, the performance benefits are too good to pass up and controllers are cheap.
> 
> We experimented using KVM and software raid and the I/O results were abysmal.
> 
> Remove the cron?


Why would i do that? There are more benefits to the resync than disadvantages.


----------



## BradND (May 16, 2013)

What like giving terrible performance to your users while its ongoing? A true enterprise solution!


----------



## qps (May 16, 2013)

We've found that software RAID works great for many applications.  mdadm is easy to use and swapping out bad drives is a matter of a few commands.  A properly configured software RAID setup can be faster than some low-end hardware RAID cards.

One factor to consider also is that adding a hardware RAID card is introducing another point of failure in your server.  If your RAID card fails, it's not as simple as plugging the drives straight into the motherboard until you can source a replacement, as the way that data is written to the drives is proprietary to the RAID card.  With some RAID cards, unless you have a spare same-model RAID card with the exact same firmware, your data will be unrecoverable. Some newer RAID cards are better about being able to move the drives to a new card of the same brand.


----------



## dmmcintyre3 (May 16, 2013)

I'm running software RAID10 on an E3-1240v2 KVM node with 42 VMs. Performance is good enough but my users may not put as much load on the disks as normal VPS customers. Also, most VMs have more memory than is needed, which gets used for disk cache in most VMs as the majority run Linux.


----------



## Marc M. (May 16, 2013)

I don't know why there is even a debate about this. Hardware RAID is better, so you use Software RAID when you have a 2 bay server like a blade or when you want to be cheap and not spend money on a decent controller. End of story


----------



## TruvisT (May 16, 2013)

marcm said:


> I don't know why there is even a debate about this. Hardware RAID is better, so you use Software RAID when you have a 2 bay server like a blade or when you want to be cheap and not spend money on a decent controller. End of story


This was my thoughts entirely. If you are going out to grab 4+ disks, why even consider software? Take the strain off the CPU entirely, get a good raid card, and you're done. All our servers run RAID10 and you can add SSD cache to greatly improve performance. Software RAID really is silly.


----------



## weservit (May 16, 2013)

One of the benefits of Hardware RAID is the write back caching, we use LSI 9271 controllers in our servers and these controllers have 1GB DDR3 cache. In combination with a BBU battery will really boost this your write performance.


----------



## PwnyExpress (May 16, 2013)

Software RAID has it's biggest advantage - Well more like RAID Cards can go out of production anytime and if it dies, well good luck 

So long as there's the RAID Software for it you'll still be able to recover most of your stuff out of it anyways with soft-raid.


----------



## GVH-Jon (May 16, 2013)

Hardware RAID is worth the price especially if you're using one of those quality LSI BBU cards. Software RAID is good if you're on a low end dedicated server while being budget strapped.


----------



## jcaleb (May 17, 2013)

I wanted to ask this for a long time. Is it possible to buy desktop hardware with say 4 disk and do a raid 10 on them? I just want a fast i/o for example.


----------



## herbyscrub (May 17, 2013)

jcaleb said:


> I wanted to ask this for a long time. Is it possible to buy desktop hardware with say 4 disk and do a raid 10 on them? I just want a fast i/o for example.


You can very easily create shared storage using cheap older generation enterprise hardware from eBay.  Most people just don't know how to get around the 1Gbps ethernet bottleneck.  Simplest way would be to buy some 4Gbps FC HBA cards for $20 and ptp.  Plenty of interesting reading you can do on this subject.


----------



## PwnyExpress (May 17, 2013)

Infiniband 10Gig cards are also coming down in price too. Switches for that stuff is now in the sub $1K range in the secondary market


----------



## Hassan (May 17, 2013)

In my opinion hardware RAID is great but its another piece of hardware that could fail on you


----------



## herbyscrub (May 17, 2013)

PwnyExpress said:


> Infiniband 10Gig cards are also coming down in price too. Switches for that stuff is now in the sub $1K range in the secondary market


Lol yeah, most of things are still out of hobby range.  But the 4Gbps stuff is super cheap right now.  We're upgrading to EMC VNX at the office, was thinking of pulling one of the old FC enclosures, but not really sure how loud it is.


----------



## elohkcalb (May 18, 2013)

Hmm... this reminds me of an article that I/O Flood posted on their blog last year.


"Hardware raid or software raid? Our take on the great religious debate" (http://blog.ioflood.com/?p=26)


----------



## Enterprisevpssolutions (May 23, 2013)

Another great discussion that has been going on forever in every forum I know.

Hardware raid when setup properly outperforms software raid in every aspect beside cost.

Software raid is for personal usage and for dev work I would never use it for production servers regardless of usage or load.

All linux users need to make sure if you're using hardware raid to set your i/o scheduler to either deadline or noop for performance increases as your not using the full benefits of the card when the linux kernel by default is set to cfq


noop is often the best choice for memory-backed block devices (e.g. ramdisks) and other non-rotational media (flash) where trying to reschedule I/O is a waste of resources
as (anticipatory) is conceptually similar to deadline, but with more heuristics that often improve performance (but sometimes can decrease it)
deadline is a lightweight scheduler which tries to put a hard limit on latency
cfq tries to maintain system-wide fairness of I/O bandwidth
Higher i/o delay you will see with software raid which means the cpu is waiting on your hard drives to process the information back and forth.

Hardware raid when enable in the linux kernel to use either deadline or noop with push all the workload from the cpu to the raid card.

Also as a reminder that not all raid cards support the trim function from SSD so if you are building a system with ssd make sure you do the research.


----------



## NodeDeals (May 24, 2013)

In a Software RAID setup, what happens if the OS crashes, bugs out or is simply reinstalled? What impact does hard reset of server have over Software RAID, and for that matter, Hardware RAID? I have seen hardware RAID with BBU. Is that some kind of a safeguard against hard reset?


----------



## concerto49 (May 26, 2013)

NodeDeals said:


> In a Software RAID setup, what happens if the OS crashes, bugs out or is simply reinstalled? What impact does hard reset of server have over Software RAID, and for that matter, Hardware RAID? I have seen hardware RAID with BBU. Is that some kind of a safeguard against hard reset?


It depends on how Software RAID is setup. It's usually quite stable these days with lots of advanced features.

BBU is backup battery unit. It's used when your server goes out of power and gives it time from the battery to write data stored in the cache to the actual disks. It's needed when you want to use the cache in the RAID card.


----------



## turfhosting (Jun 5, 2013)

It's very obvious hardware raid is the winner here. Its faster and way more reliable..

Shouldn't of even been a question -.-


----------



## AlexBarakov (Jun 9, 2013)

Both have advantages and disadvantages, however my personal opinion is that if you can not afford spending 500-1000$ on a good hardware raid card, it would be better to stick with software RAID. In my experience so far, I never had a software RAID fail and at least 3 times a hardware RAID fail, where once the data was completely lost, as the new RAID card did not recognize the old array. Of course, a good and premium RAID card, with all the fancy features that are now offered is much better than software RAID performance wise, however I don't understand all the hate towards SW RAID, as it still gets the job done, probably even better than half of the HW cards on the market.


----------

