While RAID is a widely used technology, its implementation has significantly evolved with the introduction of Solid State Drives (SSDs). This article aims to explore RAID, its effects on system performance and reliability, and how to achieve the best outcomes while being mindful of costs. It includes modern advances and updates from previous blog posts. For any further inquiries, don’t hesitate to contact us.
What is RAID?
RAID stands for Redundant Array of Inexpensive Disks. That means that RAID is a way of logically putting multiple disks together into a single array. The idea then is that these disks working together will have the speed and/or reliability of a more expensive disk. Now, the exact speed and reliability you’ll achieve from RAID depends on the type of RAID you’re using.
A Short Overview of Spinning Disk and Solid State Drives
Spinning disk, mechanical hard drives, or Hard Disk Disks (HDDs) are typically chosen in situations where needs such as speed and performance fall second to cost. Due to physical limitations and the mechanical nature of many high speed moving parts contained in them, HDDs also have a relatively high failure rate compared to SSDs. RAID is meant to help alleviate both of these issues, depending on the RAID type you use. Typically, a mechanical hard drive has a 2.5% chance of failure each year of its operation. This has been proven by multiple reports and no specific manufacturer or model has a dramatic variation from that 2.5% rate. In short, if you value your data, you are going to need to implement some methodology to help protect it from drive failure.
SSDs are typically chosen in situations where speed and performance take a priority to cost considerations. As they have no moving parts, their ability to both write and read data on them is significantly faster than on a HDD (at least 8-10x faster.) And their failure rate is roughly .5% during each year of is operation, which significantly reduces the risk compared to a spinning HDD.
Because of the dramatic difference between the technologies of HDDs and SSDs, it’s important to state that some RAID implementations that are great for HDDs are not for SSDs, and vice versa.
What Are the Types of RAID?
RAID 0 (Striping)
RAID 0 is taking any number of disks and merging them into one large volume. This will greatly increase speeds, as you’re reading and writing from multiple disks at a time. An individual file can then use the speed and capacity of all the drives of the array. The downside to RAID 0 though is that it is NOT redundant. The loss of any individual disk will cause complete data loss. This RAID type is very much less reliable than having a single disk.
There are rarely a situation where you should use RAID 0 in a server environment. You can use it for cache or other purposes where speed is important and reliability/data loss does not matter at all. But it should not be used for anything other than that. As an example, with the 2.5% annual failure rate of drives, if you have a 6 disk RAID 0 array, you’ve increased your annual risk of data loss to nearly 13.5%.
RAID 1 (Mirroring)
While RAID 1 is capable of a much more complicated configuration, almost every use case of RAID 1 is where you have a pair of identical disks identically mirror/copy the data equally across the drives in the array. The point of RAID 1 is primarily for redundancy. If you completely lose a drive, you can still stay up and running off the additional drive.
In the event that either drive fails, you can then replace the broken drive with little to no downtime. RAID 1 also gives you the additional benefit of increased read performance, as data can be read off any of the drives in the array. The downsides are that you will have slightly higher write latency. Since the data needs to be written to both drives in the array, you’ll only have the available capacity of a single drive while needing two drives.
RAID 5/6 (Striping + Distributed Parity)
RAID 5 requires the use of at least 3 drives (RAID 6 requires at least 4 drives). It takes the idea of RAID 0, and strips data across multiple drives to increase performance. But, it also adds the aspect of redundancy by distributing parity information across the disks. There are many technical resources out there on the Internet that can get down into the details as to how this actually happens. But in short, with RAID 5 you can lose one disk, and with RAID 6 you can lose two disks, and still maintain your operations and data.
RAID 5 and 6 will get you significantly improved read performance. But write performance is largely dependent on the RAID controller used. For RAID 5 or 6, you will most certainly need a dedicated hardware controller. This is due to the need to calculate the parity data and write it across all the disks. RAID 5 and RAID 6 are often good options for standard web servers, file servers, and other general purpose systems where most of the transactions are reads, and get you a good value for your money. This is because you only need to purchase one additional drive for RAID 5 (or two additional drives for RAID 6) to add speed and redundancy.
RAID 5 or RAID 6 is not the best choice for a heavy write environment, such as a database server, as it will likely hurt your overall performance.
It is worth mentioning that in a RAID 5 or RAID 6 situation, if you lose a drive, you’re going to be seriously sacrificing performance to keep your environment operational. Once you replace the failed drive, data will need to be rebuilt out of the parity information. This will take a significant amount of the total performance of the array. These rebuild times continue to grow more and more each year, as drives get larger and larger.
RAID 10 (Mirroring + Striping)
RAID 10 requires at least 4 drives and is a combination of RAID 1 (mirroring) and RAID 0 (striping). This will get you both increased speed and redundancy. This is often the recommended RAID level if you’re looking for speed, but still need redundancy. In a four-drive configuration, two mirrored drives hold half of the striped data and another two mirror the other half of the data. This means you can lose any single drive, and then possibly even a 2nd drive, without losing any data. Just like RAID 1, you’ll only have the capacity of half the drives, but you will see improved read and write performance. You will also have the fast rebuild time of RAID 1.
When Should I Use RAID?
RAID is extremely useful if uptime and availability are important to you or your business. Backups will help insure you from a catastrophic data loss. But, restoring large amounts of data, like when you experience a drive failure, can take many hours to perform. Those backups could be hours or days old, costing you all the data stored or changed since the last backup. RAID allows you to weather the failure of one or more drives without data loss and, in many cases, without any downtime.
RAID is also useful if you are having disk IO issues, where applications are waiting on the disk to perform tasks. Going with RAID will provide you additional throughput by allowing you to read and write data from multiple drives instead of a single drive. Additionally, if you go with hardware RAID, the hardware RAID card will include additional memory to be used as cache, reducing the strain put on the physical hardware and increase overall performance.
Note: We generally do not advise using a hardware RAID card for SSD volumes, as the additional cache isn’t necessary because of the speed of the SSDs themselves.
What Type of RAID Should I Use?
- No RAID – Good if you are able to endure several hours of downtime and/or data loss due while you restore your site from backups.
- RAID 0 – Good if data is unimportant and can be lost, but performance is critical (such as with cache).
- RAID 1 – Good if you are looking to inexpensively gain additional data redundancy and/or read speeds. (This is a good base level for those looking to achieve high uptime and increase the performance of backups.)
- RAID 5/6 – Good if you you have Web servers, high read environments, or extremely large storage arrays as a single object. This will perform worse than RAID 1 on writes. If your environment is write-heavy, or you don’t need more space than is allowed on a disk with RAID 1, RAID 1 is likely a more effective option.
- RAID 10 – A good all-around solution that provides additional read and write speed as well as additional redundancy.
Software vs Hardware?
Software RAID is an included option in all of Colohouse’s dedicated servers. This means there is NO cost for software RAID 1, and is highly recommended if you’re using local storage on a system. It is highly recommended that drives in a RAID array be of the same type and size.
Software-based RAID will leverage some of the system’s computing power to manage the RAID configuration. If you’re looking to maximize performance of a system, such with a RAID 5 or 6 configuration, it’s best to use a hardware-based RAID card when you’re using standard HDDs.
Hardware-based RAID requires a dedicated controller installed in the server. Colohouse engineers will be happy to provide you with recommendations regarding which hardware RAID care is best for you that is based on what RAID configuration you want to have. A hardware based RAID card does all the management of the RAID array(s), providing logical disks to the system with no overheard on the part of the system itself. Additionally, hardware RAID can provide many different types of RAID configurations simultaneously to the system. This includes providing a RAID 1 array for the boot and application drive and a RAID-5 array for the large storage array.
What Does RAID Not Do?
- RAID does not equate to 100% uptime. Nothing can. RAID is another tool on in the toolbox meant to help minimize downtime and availability issues. There is still a risk of a RAID card failure, though that is significantly lower than a mechanical HDD drive failure.
- RAID does not replace backups. Nothing can replace a well planned and frequently tested backup implementation!
- RAID will not protect you against data corruption, human error, or security issues. While it can protect you against a drive failure, there are innumerable reasons for keeping backups. So do not take RAID as a replacement for backups. If you don’t have backups in place, you’re not ready to consider RAID as an option.
- RAID does not necessarily allow you to dynamically increase the size of the array. If you need more disk space, you cannot simply add another drive to the array. You are likely going to have to start from scratch, rebuilding/reformatting the array. Luckily, Colohouse engineers are here to help you architect and execute whatever systems you need to keep your business running.
- RAID isn’t always the best option for virtualization and high-availability failover. In those circumstances, you will want to look at SAN solutions.
Editor’s Note: This post was originally published in March of 2010 and has been completely revamped and updated for accuracy and comprehensiveness.