olly - stock.adobe.com

Tip

AHCI vs. RAID: Features, differences and applications

AHCI and RAID are fundamental concepts for running an efficient data management and storage infrastructure. Learn the AHCI and RAID basics, as well as how SATA and IDE compare.

Even in this age of SSDs, IT still works with technologies developed in the last century. These technologies include 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 differences. Each includes a unique 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 into 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. Newer technologies, such as erasure coding, are beginning to supplant it in data centers, however.

RAID is a data protection and availability mechanism that lets a storage 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, don't support RAID. Even if the hardware does not natively support RAID, the Windows OS 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 do the following:

  • Install multiple storage devices -- hard drives and SSDs -- and use them as a single volume.
  • Enable data redundancy to protect the storage system against drive fails.
  • 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. Most RAID structures require a larger number of disks, however. A two-disk system can enable storage mirroring, or RAID 1, which means, any time 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.

Chart of RAID levels

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 data redundancy, striping improves read/write performance. The disadvantage to striping, however, is that no redundancy guards 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, RAID 1 implementations 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.

RAID 5 and RAID 6 are the most common other RAID levels. 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 fail and still be operational.

Some of the newer RAID systems combine multiple RAID levels into one. For example, RAID 10, which is sometimes called RAID 1+0, 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 if a disk fails.

How SATA and IDE compare

Integrated Drive Electronics (IDE) was developed in 1986 and heavily used in the 1990s and early 2000s. Originally known as Parallel ATA, or PATA, IDE disks served to replace earlier disk standards, such as disks requiring a run-length limited or modified frequency modulation controller.

While it was possible to build a RAID array consisting of IDE disks, the hardware limited the RAID levels that admins could use. A single IDE controller could support two disks, daisy-chained together, sharing a single cable. Most PCs at the time featured two IDE ports, meaning the system could accommodate a maximum of four IDE disks. In contrast, most modern PCs feature six SATA ports.

While both the SATA and IDE standards evolved, supported throughput is another major difference between the hardware options. SATA has always supported a higher throughput than IDE. The maximum transfer rate for an IDE disk is 133 MBps. In contrast, first-generation SATA disks supported 1.5 Gbps transfers, while modern SATA hardware enables up to 6 Gbps.

Admins commonly create RAID arrays on top of AHCI hardware.

AHCI vs. RAID or AHCI and 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 of AHCI vs. 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 also impacts its performance. Hardware RAID arrays are faster, for example, than software RAID. Similarly, the RAID level also impacts performance:

  • RAID 0 arrays stripe data across multiple disks, which improves performance. If such a set contains three disks, for instance, then read/write speeds are theoretically three times faster than that of a single disk.
  • RAID 1 provides data 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.
  • 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 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 information alongside the 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.

AHCI vs. RAID: Uses, advantages and features

Admins can use RAID and AHCI independently of one another but also together. Building a RAID array on top of AHCI hardware enables broad hardware compatibility since the AHCI standard enables the use of both HDD and SSD SATA disks.

AHCI's support of hot swapping is a benefit. RAID arrays are often designed to provide protection against data loss in the event of a disk failure. Combining a fault-tolerant RAID array with AHCI hardware means that, if a disk were to fail, the RAID array enables the storage system to continue to function. It is then possible to replace the failed disk and rebuild the RAID array without taking the system offline.

Many PCs are equipped with a single SATA disk, even though PC hardware easily enables the creation of a RAID array. Likewise, it is possible to build a RAID array using architectures other than AHCI. Admins who need a high-performance RAID array, for example, often use NVMe disks, as opposed to SATA disks. The NVMe architecture reduces latency and supports a higher number of IOPS than AHCI.

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.

Brien Posey is a 15-time Microsoft MVP with two decades of IT experience. He has served as a lead network engineer for the U.S. Department of Defense and as a network administrator for some of the largest insurance companies in America.

Scott Lowe is a former CIO and frequent contributor to TechTarget, TechRepublic and other IT publications. He is the co-founder, CEO and managing consultant of The 1610 Group.

Next Steps

RAID data protection quiz: Test your knowledge

RAID vs. backup: Learn the differences and benefits of both

Dig Deeper on Primary storage devices