Fundamentals 11 min read

Understanding RAID Levels, Disk Performance, and How to Inspect RAID Configurations on Linux

This article explains why mechanical hard drives are slower and less reliable than electronic components, introduces RAID 0, RAID 1, and RAID 5 as solutions to improve speed and fault tolerance, discusses RAID card caching, and shows practical Linux commands for examining RAID hardware and configuration.

Refining Core Development Skills
Refining Core Development Skills
Refining Core Development Skills
Understanding RAID Levels, Disk Performance, and How to Inspect RAID Configurations on Linux

Electronic computers rely on electronic components, but mechanical hard drives introduce two major problems for servers: low speed (millisecond‑level latency) and high failure rates.

To ensure stable, high‑performance server operation, these drawbacks must be mitigated, often by using multiple disks together.

RAID 0 splits a file into N pieces and distributes them across N disks, allowing parallel reads that can theoretically increase throughput by N times. However, RAID 0 provides no redundancy—if any disk fails, the entire storage system fails.

RAID 1 mirrors each data block on a second disk. This improves read speed and eliminates the single‑disk failure problem, but it doubles the required storage capacity, making it costly for large volumes.

RAID 5 uses striping with distributed parity: data is split into blocks, and an additional parity block is stored on a separate disk. Any single disk can fail while the data is reconstructed from the remaining blocks and the parity, offering a good balance of capacity efficiency and fault tolerance.

Modern RAID controllers include onboard cache (often 1‑2 GB) and a battery to preserve cached writes during power loss. Examples of popular Dell PERC cards are:

PERC S120 – software RAID, no cache, supports RAID 0/1

PERC H330 – entry‑level hardware RAID, no cache, supports RAID 0/1/5/10/50

PERC H730 – mainstream hardware RAID with 1 GB cache and battery, supports RAID 0/1/5/6/10/50/60

PERC H730P – high‑performance version with 2 GB cache and battery

PERC H830 – similar to H730P but uses an external interface

The cache accelerates both reads and writes: if data resides in cache, the controller can serve it without accessing the mechanical disks.

Note that using DIRECT I/O only bypasses the OS page cache; the RAID controller’s cache remains a “black box” to the operating system.

Hands‑on RAID inspection

On a Linux server you can view the RAID controller model with:

cat /proc/scsi/scsi

Example output shows a Dell PERC H730 with a 1 GB cache.

Host: scsi10 Channel: 02 Id: 01 Lun: 00
  Vendor: DELL     Model: PERC H730 Mini   Rev: 4.27
  Type:   Direct-Access  ANSI  SCSI revision: 05

To list virtual drives and their RAID level, use MegaCli:

# /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL
Virtual Drive: 1 (Target Id: 1)
Name              :
RAID Level        : Primary-5, Secondary-0, RAID Level Qualifier-3
Size              : 1.633 TB
Sector Size       : 512
Is VD emulated    : No
Parity Size       : 278.875 GB
State             : Optimal
Strip Size        : 128 KB
Number Of Drives  : 7
Span Depth        : 1

The "RAID Level" line confirms this system is using RAID 5. For reference, common RAID level codes are:

RAID 1: Primary-1, Secondary-0, RAID Level Qualifier-0

RAID 0: Primary-0, Secondary-0, RAID Level Qualifier-0

RAID 5: Primary-5, Secondary-0, RAID Level Qualifier-3

RAID 10: Primary-1, Secondary-3, RAID Level Qualifier-0

The "Strip Size" (e.g., 128 KB) determines how large each data stripe is; a 512 KB file would be split into four 128 KB strips that can be read in parallel across disks, improving throughput. Files smaller than the strip size do not benefit from parallel reads.

Listing the physical disks in the RAID group with MegaCli shows seven ~278 GB Seagate drives, confirming that only one disk’s capacity is sacrificed for redundancy in a RAID 5 array.

# /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL
...Drive's position: DiskGroup: 1, Span: 0, Arm: 0
Device Id: 1
Raw Size: 279.396 GB
...Drive's position: DiskGroup: 1, Span: 0, Arm: 6
Device Id: 7
Raw Size: 279.396 GB

The "Inquiry Data" field reveals each drive’s manufacturer and model (Seagate 300 GB, 10 k RPM).

Conclusion

Mechanical hard drives are slower and less reliable than purely electronic storage; RAID technology mitigates these issues by adding redundancy (RAID 1, RAID 5) and leveraging controller cache to boost I/O performance. Linux tools such as cat /proc/scsi/scsi and MegaCli allow administrators to inspect RAID configurations and verify that the desired level of performance and fault tolerance is in place.

cachingLinuxHardwarestorageRAIDdisk-performance
Refining Core Development Skills
Written by

Refining Core Development Skills

Fei has over 10 years of development experience at Tencent and Sogou. Through this account, he shares his deep insights on performance.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.