I. Introduction to raid
RAID (Redundant Array of independent disk independent redundant disk array) is a data protection policy.
Ii. Several Common RAID levels
1. RAID 0:
Data I/O can be improved through parallel reading. reading efficiency is high, but data fault tolerance and protection are not provided. It is not recommended for SQL Server.
2. Raid 1:
Image protection: There are two drives, one is the master drive, and the other is the image, so it is twice the actual needs, and the second is used for redundancy. when using RAID 1, our storage capacity should be (N * s/2 ).
A write operation writes data to two disks. Therefore, the write speed may be slightly affected, but the read speed is almost twice that in most cases. because the drive can be accessed in parallel during the read operation, thus improving the throughput. Raid 1 is limited to two drives.
3. RAID 5:
Disk strip with verification. In this type of RAID, data is written to all the drives in the array in the form of complex strip, and distributed verification blocks exist in all the drives. In this way, RAID 5 may use an array of any size consisting of three or more disks, and only sacrifices the storage capacity equivalent to one disk for verification. However, this verification is distributed and does not exist independently on any physical disk.
RAID 5 is cost-effective because it sacrifices less storage capacity in large arrays and is widely used. Different from an image, strip with verification must be calculated for each write strip between disks, resulting in some overhead. Therefore, throughput is not always a project that is easy to calculate. It depends to a large extent on the computing capability of the system during verification calculation.
Calculating the RAID 5 capacity is very simple: (n-1) * s ). RAID 5 arrays can avoid the loss of any single disk in this column.
Each write operation on RAID5 involves multiple reads for computing and storage. RAID 5 is not a good choice when there are many write operations on SQL Server and requires high efficiency.
4. Raid 6
Disk strip with dual verification. Raid 6 is very similar to RAID 5, but each of its strip uses two verification blocks instead of one, which enhances protection against disk faults.
Raid 6 is a new member of the raid family. Raid 6 was added several years after several other raid types were standardized. Raid 6 is special because it can withstand the failure of any two drives in the array and prevent data loss. However, in combination with additional redundancy, the raid 6 array sacrifices the equivalent capacity of two drives in the array, and needs to find at least four drives in the column. The capacity of RAID 6 can be calculated using (n-2) * s.
5. Raid 10:
A striped image. Technically, raid 10 is a hybrid raid, including a pair of RAID images that exist in a non-verified strip (RAID 0.
When there are only two drives in an array, many manufacturers call it raid 10 (or raid 10 +), but technically this should be RAID 1, this is because the array has at least four drives to strip. For raid 10, the drive must be one-to-one, so the number of drives in the array may only be an even number.
Raid 10 can operate normally when nearly half of the drive group is lost, and can withstand failures or loss of at most one drive on each drive. Raid 10 does not contain verification computing, which gives RAID 5 and raid 6 a certain performance advantage, and the array has lower requirements on computing power. Raid 10 provides read performance that exceeds any common type of raid because all the drives in the array can be used simultaneously during read operations. However, the Write Performance of RAID 10 is much lower. The raid 10 capacity calculation method is the same as RAID 1 (N * s/2 ).
Raid performance comparison:
Read efficiency: because it is parallel reading, reading efficiency is very high.
Write efficiency: RAID 0> RAID 1> raid 10> RAID 5
Disk utilization: RAID 0> RAID 5> RAID 1 = raid 10
Fault Tolerance: Raid 10 = RAID 1> RAID 5> RAID 0
We recommend that you use RAID 1 or raid 10.
Iii. Raid and SQL Server
DB Server physical disk design with separate raid volumes for data, log, tempdb and backup files.
Disk architecture:
C: OS [requires good data read/write efficiency and strong fault tolerance capabilities to provide data protection]
D: Run raid10 to store dB data files. [reading efficiency is required, writing efficiency is relatively low, and fault tolerance capability is strong. If the data file is large, disk space is required to be saved.]
E: Run raid1 to store dB log files. [log reads and writes frequently during db operation, requiring high data read/write efficiency]
F: Run raid10 to store the database's tempdb [store temporary databases]
G (optional): Perform raid1 and data backup. We recommend that you back up data at the remote end.
SSD hard drive: The full name of SSD is solid state disk/drive. it can be widely used in servers, desktops, laptops, mobile devices, game consoles, etc. It accelerates startup, improves performance, and reduces power consumption.
Advantages:
Fast (high I/O ).
Durable shockproof
No noise
Light Weight
SQL Server with SSD hard drive can achieve good I/O performance
Disadvantages:
The price is high and the capacity is small. raid will further reduce the capacity, so the cost-effectiveness is not high. for companies that do not consider the price, let alone.
Technology is not too mature
Iv. Summary
Different raid architectures can improve data efficiency and utilization for different features.