olly - stock.adobe.com

Tip

AHCI vs. RAID: Which is better for performance?

The Advanced Host Controller Interface and RAID are fundamental concepts for running an efficient data management and storage infrastructure. Learn the AHCI and RAID basics.

Even in this age of SSDs, IT still works with technologies developed in the last century. These techs include the Advanced Host Controller Interface and redundant arrays of independent disks.

IT often views AHCI and RAID in the same context, but they serve different purposes. Whether a user operates a single PC or a full storage device environment, it's important to understand the AHCI vs. RAID question. Each includes a different set of capabilities that can help ensure smooth operation of the storage environment. This article lays out the basics to help make the right decisions when it comes to AHCI vs. RAID.

Overview of AHCI

AHCI is the standard for the storage interface that lets software -- typically an OS -- communicate with SATA devices. Intel introduced AHCI in 2004 as a replacement for the aging Parallel ATA/Integrated Drive Electronics interface.

AHCI has enabled some of the capabilities inherent in SATA devices to be used on the OS side. For instance, SATA enabled support for hot swapping devices -- the ability to plug a new device in to a computer without having to reboot the computer. AHCI enables Windows, Unix and Linux OSes to use hot swapping.

Native Command Queuing (NCQ) on hard drives is a prominent feature introduced in SATA on the hardware side and AHCI on the OS side. Rather than operating on a traditional serial command queuing, first-in, first-out command execution process, NCQ lets disks -- including SSDs -- optimize how they handle simultaneous storage operations. The benefits are different depending on the type of storage device in use. For hard drives, NCQ means that the read/write heads must move less often. Read/write head movement is one of the biggest contributors to latency in HDDs. Optimizing their movement yields performance gains.

AHCI also provides benefits for SSDs, such as improved support for large file transfers, but its shallow queue depth limits the number of I/O requests that it can service. Workarounds are necessary to enable SSDs to avoid command queuing, which can slow performance. Even with NCQ, the need to queue commands at all implies there's a holdup somewhere that requires the formation of a queue.

To address the queuing issue permanently, the NVMe standard replaces older interfaces, such as SATA, and introduces new command management capabilities. NVMe is designed for flash, which eliminates the downsides of supporting modern storage media with old protocols.

Overview of RAID

RAID was first used in 1987. Today, RAID is far more capable than early versions. However, newer technologies, such as erasure coding, are beginning to supplant it.

RAID is a data protection and availability mechanism that lets a system continue to operate after the loss of one or more HDDs or SSDs. It typically includes the ability to rebuild the contents of a failed disk once it has been replaced.

Admins can create RAID storage volumes on any computer with multiple storage devices if the computer or storage array supports RAID. Some PCs may not support a RAID option. Some storage arrays, known as JBODs (just a bunch of disks), don't support RAID. Even if the hardware does not natively support RAID, however, the Windows operating system enables JBODs to be treated as a software-based RAID array.

On modern PCs, enabling RAID on SATA ports on the motherboard usually also enables AHCI support. Having RAID enables admins to:

  • install multiple storage devices -- hard drives and SSDs -- and use them as a single volume;
  • enable redundancy to protect the system against the failure of one or more disks; and
  • improve performance by spreading storage operations across multiple devices rather than a single disk.

Admins need at least two disks as a part of a RAID group. However, most RAID structures require a larger number of disks. A two-disk system can enable storage mirroring, or RAID 1, which means that, anytime data is written to one disk, the RAID controller copies that write to the second disk. Hence, if one disk fails, a duplicate copy still exists.

Alternatively, admins can use striping, or RAID 0, to instruct the computer to write data to both disks simultaneously. While mirroring exists purely for the sake of redundancy, striping improves read/write performance. The disadvantage to striping, however, is that there is no redundancy to guard against a disk failure. If one disk in the set fails, then the entire set fails.

Incidentally, stripe sets commonly use more than two disks. Likewise, there are also RAID 1 implementations that mirror data to more than one redundant disk. For example, some organizations create three-way mirrors, which result in three independent copies of the data.

There are other RAID levels. RAID 5 and RAID 6 are the most common. Both use parity to help protect data from device failure. With RAID 5, a system can withstand the loss of a single disk. With RAID 6, two disks can bite the dust and still be operational.

Some of the newer RAID implementations combine multiple RAID levels into one. RAID 10 (which is sometimes called RAID 1+0), for example, creates a mirrored stripe set. Like RAID 0, RAID 10 improves storage device performance by striping data across multiple disks. That entire stripe set is then mirrored to a second stripe set that can take over in the event of a disk failure.

AHCI vs. RAID or AHCI + RAID?

AHCI and RAID are sometimes compared with one another because both are storage technologies. Even so, one cannot make a true apples-to-apples comparison between the two because they serve different purposes. AHCI is a hardware-level architecture that enables systems to support the use of SATA disks. RAID is a logical disk structure that admins can create at either the hardware or the software level.

Admins commonly create RAID arrays on top of AHCI hardware. Many motherboards support a hardware RAID feature that enables admins to treat SATA disks as a RAID array. Even if such a feature is lacking, however, the Windows OS' Disk Management console can arrange disks into a RAID array at the software level. Similarly, Windows Storage Spaces can group physical disks into storage pools from which to create RAID volumes.

Chart comparing AHCI and RAID

The level of performance varies considerably based on several factors. The first such consideration is the SATA interface. SATA 1 supported a maximum speed of 1.5 Gbps, while SATA 2 ran at 3 Gbps. Current generation SATA 3 ports support a maximum speed of 6 Gbps. However, hard disks often perform at slower levels than what the port can deliver. This is especially true for heavily fragmented HDDs.

If a RAID array is constructed from a system's SATA disks, then the RAID type will also impact its performance. Hardware RAID arrays are faster, for example, than software RAID. Similarly, the RAID level also impacts performance. RAID 1 provides redundancy but does not deliver any additional performance beyond what an individual hard disk supplies. Depending on the implementation, some RAID 1 arrays result in decreased write performance because of the overhead involved in writing data to multiple disks.

Admins commonly create RAID arrays on top of AHCI hardware.

RAID 0 arrays stripe data across multiple disks, which improves performance. If such a set contains three disks, for instance, then read/write speeds will theoretically be three times faster than that of a single disk.

RAID 5 and 6 arrays tend to fall in between the performance of RAID 0 and RAID 1. Like RAID 0, RAID 5 and 6 are indeed stripe sets and benefit from having data that span multiple disks. However, these arrays are designed to withstand disk failures. As such, they must calculate parity data for each write operation and store the parity data alongside the actual data written to the disk. The overhead associated with parity data substantially decreases the array's performance over that of a comparable RAID 0 array.

Additionally, admins lose some of the array's capacity because of the need to store parity data. In the case of a RAID 5 array, the overhead equals that of an entire disk. In a RAID 6 array, the overhead is equal to two disks. For example, if an array has five 1 TB disks and it's configured to use RAID 5, its usable capacity is 4 TB. If that same array is configured to use RAID 6, its usable capacity is 3 TB. While a RAID 5 array can survive a disk failure, a RAID 6 array can survive two simultaneous disk failures.

Bottom line on AHCI vs. RAID

In discussing AHCI vs. RAID, it's important to know where these two concepts fit into the overall storage device environment. AHCI ensures full functionality in SATA devices. RAID provides mirroring and striping capabilities key to data protection.

Get these fundamentals right to maintain a fully functional storage environment.

Next Steps

RAID data protection quiz: Test your knowledge

Dig Deeper on Primary storage devices

Disaster Recovery
Data Backup
Data Center
Sustainability and ESG
Close