About hard disks and RAID

Source: Internet
Author: User

1 basic working principle of Hard Disk 1.1 Structure of Hard Disk Components

 

1.2 Glossary of main parameters

Head:In the process of exchanging data with the hard disk, the read operation is much faster than the write operation. The hard disk manufacturer develops a read/write separation head.

Rotation Speed (Rotationl Speed ):It is the rotation speed of the motor spindle in the hard disk, that is, the maximum number of turns that can be completed by the hard disk in one minute. The faster the speed of the hard disk, the faster the hard disk searches for files, and the higher the transmission speed of the hard disk. At present, the common hard drive speed on the market is generally 5400 rpm, 7200 rpm, 10000 rpm, 15000 rpm. Theoretically, the faster the speed, the better. Because a high speed can shorten the average seeking time and actual read/write time of the hard disk. However, the faster the speed, the larger the heat, is not conducive to heat dissipation. The current mainstream hard drive speed is generally more than 7200rpm. As for the SCSI hard drive, the spindle speed can reach 7200-10000 RPM, while the maximum speed of the SCSI hard drive is as high as 15000 RPM.

Single disk capacity:It is one of the most important parameters of a hard disk, which determines the level of the hard disk to a certain extent. A hard disk is composed of multiple storage discs, and a single disk capacity is the maximum data size that a storage disc can store.

Disk quantity:A disk is the medium for storing data in a hard disk. A hard disk is composed of multiple disks and separated by washers. The more disks a hard disk has, the larger the thickness and the greater the fever.

Random seek time (unit: milliseconds ):Different Speed, performance differences are directly reflected in the performance of random read/write seek time. The value of random seek performance is lower, the better. It is also a performance that daily hard drive applications can directly experience in terms of speed.

Average seek time (Average seek time ):It refers to the time used by the hard disk to move the write head on the disk to the specified track to find the corresponding target data. It describes the hard disk's ability to read data, in milliseconds. When the capacity of a single disc increases, the seek action and moving distance of the head are reduced, reducing the average seek time and accelerating the hard disk speed.

Data Cache:It refers to the high-speed memory inside the hard disk. in the computer, some data is temporarily saved as a buffer for reading and re-reading. In earlier versions, the high-speed cache for hard disks was generally KB-2 MB. Currently, the data cache for mainstream SATA hard disks is 32 MB.

Track to track time (single track seek ):The time when the head is transferred from one track to another, in milliseconds (MS ).

Max full seek ):The full time, in milliseconds (MS), that the head begins to move until it finally finds the desired data block ).

Continuous failure-free time (MTBF ):The maximum time from the start of the hard disk to the failure. Generally, the MTBF of a hard disk is at least 30000 or 40000 hours.

1.3 hard drive types and advantages and disadvantages

The order of Hard Disk development is as follows:

1.3.1 IDE Hard Drive

 

Integrated Drive Electronics (IDE) is a hard Drive that integrates the controller and the disk. It is the transmission interface of the hard disk, and the other name is ATA (Advanced Technology Attachment ), it refers to the same thing and adopts the Parallel Multiplexing Technology (PATA ).

Generally, a 16-bit Data Bus is used to transmit two bytes each time the bus processes the data. Generally, the bandwidth is 100 Mbytes/sec, and the data bus must be locked at 50 MHz. The general IDE Hard Drive Speed is at 5400/7200 RPM. The transmission rate stops at around 133 Mb/s. Due to the limitations of parallel technology, it is gradually eliminated.

1.3.2 SATA hard drive

The hard disk of the SATA (Serial ATA) port is also called a Serial hard disk. SATA is named after its Serial data transmission method. In the process of data transmission, data lines and signal lines are used independently, and the clock frequency of transmission remains independent. Therefore, the SATA transmission rate can reach 30 times of parallel transmission compared with PATA.

Early SATA-1 can reach 150 MB/s, later SATA-2 standards can reach 300 MB/s, and the third generation of SATA-3 protocol standard transmission rate can reach 600 M/s, speed at 7200 RPM.

SATA hard disks support hot swapping, but when the hard disk is damaged, the specific bad disk cannot be displayed, resulting in hot swapping Technology of little significance. When a single thread or a few threads work, the performance is already very good, however, the performance decreases sharply during multi-task or massive data transmission because the mechanical chassis is relatively low.

1.3.3 SCSI hard drive

The Small Computer System Interface is a storage unit Interface mode specially designed for Small Computer systems. The SCSI Computer can send commands to a SCSI device, the disk can move the drive arm to locate the head and transmit data in the disk media and cache. The entire process is executed in the background. In this way, multiple commands can be sent at the same time, which is suitable for I/O applications with large loads. The overall performance of the disk array is much higher than that of the ATA-based hard disk array.

Mainstream SCSI hard disks use the Ultra 320 SCSI interface, which provides an interface transmission speed of 320 Mb/s. The average seek time is 4-5 ms, the CPU usage is low, and the parallel processing capability is strong, data transmission can be processed asynchronously. An ordinary SCSI hard disk has a speed of 10000/15000 RPM, but it is expensive.

1.3.3 SAS hard drive

SAS (Serial Attached SCSI) is a new generation of SCSI technology. Like the popular Serial ATA (SATA) hard drives, Serial technology is used to achieve higher transmission speeds and improve internal space by shortening the connection lines. SAS is also a revolutionary development of SCSI technology. SAS is also a revolutionary development of SCSI technology.

The transmission rate is 600 MB/s. Each SAS port provides 3 Gbit/s bandwidth, and the transmission capability is almost the same as that of 4 Gbit/s optical fiber. It is sufficient to match the FC hard disk, not only to connect to the SCSI hard disk, but also to be compatible with the SATA hard disk, the average retrieval time is 3-4 ms, but the price is too high. SAS hard disks are more expensive than Ultra 320 SCSI hard disks of the same capacity, but they are also expensive, if the group is RAID, you also need to buy a SAS card.

1.3.4 FC hard drive

FC (Fiber Channel) is generally considered to be an Interconnected Architecture between the system and the system or between the system and the subsystem. It uses optical fiber connections between systems through point-to-point (or exchange) configuration. (The hard disk itself does not have the FC interface. The Rack to which the hard disk is inserted carries the FC interface and is interconnected with the optical fiber switch through the optical fiber ).

Transmission rate can reach 200 MB/s-400MB/s, the average retrieval time is about 3 ms, high-performance transmission, excellent stability, but extremely expensive, in addition to extremely high-end enterprise applications, basically no market, the rise of SAS also puts great pressure on FC.

1.3.5 SSD hard drive

A Solid State Disk (Solid State Disk or Solid State Drive), also known as an electronic hard Disk or Solid State electronic Disk, is a hard Disk consisting of a control unit and a Solid State storage unit (DRAM or FLASH chip.

Excellent shock resistance, wide chip operating temperature range (-40 ~ 85 deg C ). High cost.

There are two types of SSD:

(1) SSD Based on FLASH memory (IDE Flash DISK and Serial ata flash Disk): This type of SSD can be moved, and data protection is not controlled by the power supply and can be adapted to various environments, however, the service life is not high and is suitable for individual users.

(2) DRAM-based solid state disks: they follow the design of traditional hard disks and can be set and managed by file systems of most operating systems. They also provide FC interfaces and PCI interfaces, the application methods can be divided into two types: SSD hard disk and SSD hard disk array.

2 RAID

The above introduces some hard disk-related things, which are flushed from the Internet. In practical applications, the most significant impact on the performance of our programs is the network and disk I/O, because the CPU speed is now very fast, the memory I/O speed has reached a very high level (about 5 GB per second), but our data is stored on the disk, the program needs to constantly read data and store data, because disk performance is one of the most influential factors (not to mention the network ).

The defect of modern disks is: poor I/O performance and poor stability. We will only discuss qualitative things here. As for performance, we are willing to spend money to buy expensive ones. Stability is involved. If a hard disk is faulty or damaged, the hard disk cannot be used any more. If the requirement for data storage is particularly high, it is unimaginable. As a result, RAID is a new technology.

2.1 RAID Concept

Independent Disk redundancy Array (RAID, Redundant Array of Independent Disks), formerly known as a cheap Disk redundancy Array (RAID, Redundant Array of Inexpensive Disks)Hard Disk array. The basic idea is to combine multiple relatively inexpensive hard disks into a hard disk array group, so that the performance can reach or even exceed a hard disk with a high price and huge capacity. Depending on the selected version, RAID has the following advantages over a single hard disk: Enhanced Data Integration, enhanced fault tolerance, and increased processing capacity or capacity. In addition, the disk array looks like a separate hard disk or logical storage unit for a computer. DividedRAID-0, RAID-1, RAID-1E, RAID-5, RAID-6, RAID-7, RAID-10, RAID-50, RAID-60.

The evaluation of a RAID mainly relies on three indicators:Speed, disk usage, redundancy.

2.2 RAID0

Merge multiple disks into a large disk with no redundancy, parallel I/O, and the fastest speed. If a disk (physical) is damaged, all data is lost.

 

2.3 RAID1

Two or more groups of N disks are used as images for each other. In some multi-threaded operating systems, the read speed is good, and the write speed is slightly reduced. Unless the primary disk and image with the same data are damaged at the same time, the operation can be maintained as long as a disk is normal, with the highest reliability. Is the highest unit cost in RAID.

 

2.4 RAID2

Improved Version of RAID 0, which uses Hamming Code to encode and partition the data into independent bits, and write the data into the hard disk separately. Because the Error Correction Code (ECC, Error Correction Code) is added to the data, the overall data capacity is larger than that of the original data, you can correct errors in case of data errors to ensure that the output is correct. The data transmission rate is quite high. RAID2 requires at least three disk drives to operate. Multiple disks are required to store inspection and recovery information, making RAID2 more complicated. Therefore, it is rarely used in commercial environments.

 

2.5 RAID3

Parallel Transmission with parity codes. The Bit-interleaving (Data staggered storage) technology can only be used for error detection and cannot be used for error correction. It is mainly used for graphics (including animation) and other scenarios that require high throughput. It provides a good transmission rate for a large amount of continuous data, but for applications that often need to perform a large number of write operations, the parity disk will become the bottleneck of write operations. Although the security of data without images is high, the hard disk utilization is greatly improved by using a separate verification disk. To achieve this, you must have more than three drives with a high write/read rate. Because the number of check bits is relatively small, the calculation time is relatively small.

 

2.6 RAID4

The structure of an independent disk with a parity code. Similar to RAID3, data access is performed by data block, that is, by disk. Each access is a disk. In the case of failure recovery, it is much more difficult than RAID3, the controller design is much more difficult, and the data access efficiency is not very good. When the host accesses the RAID card, it should all be Block-based. when reading the card, RAID3 needs to access all disks for data. RAID4 only needs to access a certain disk. Considering that disk tracing takes a long time, RAID4 is easier to perform concurrent operations when reading large data volumes, so the performance should be better. When writing data, RAID3 can directly calculate the check value, and then write the data and the check value to the disk respectively. RAID4 needs to read the old data and the old check value, use the old data, old check value, and new data to calculate the new check value, and then write the new data and new check value.

 

2.7 RAID5

The independent disk structure of distributed parity. Disk Striping (Hard Disk partitioning) is a storage solution that combines storage performance, data security, and storage costs. The data and the corresponding parity information are stored on each disk that makes up RAID 5, and the parity information and the corresponding data are stored on different disks respectively. When a disk data in RAID 5 is damaged, you can use the remaining data and the corresponding parity information to restore the damaged data. RAID 5 can be understood as a compromise between RAID 0 and RAID 1. Reading efficiency is high, writing efficiency is average, and block-based collective access efficiency is good. However, the data transmission concurrency is not well solved, and the controller design is also quite difficult. Each write operation generates four actual read/write operations. The old data and parity information are read twice, and new data and parity information are written twice. However, when the disk is removed, the running efficiency is greatly reduced.

 

2.8 RAID6

An independent disk structure with two parity codes for distributed storage. Compared with RAID 5, RAID 6 adds the second independent parity information block. Two independent parity systems use different algorithms, and the data reliability is very high. Even if the two disks are invalid at the same time, the data usage will not be affected. It is mainly used when data is absolutely error-free. The design of the controller becomes very complex and the write speed is not good. It takes a lot of time to calculate the parity value and verify the data correctness, resulting in unnecessary load. RAID 6 must have more than four disks to take effect. RAID 6 is also the most common disk array level in the hardware disk array card function.

 

2.9 RAID10/01

RAID 1 + 0 is first mapped and then partitioned data, and then all the hard disks are divided into two groups, which is regarded as the lowest combination of RAID 0, and then the two groups are considered as RAID 1 operations.

RAID 0 + 1 is the opposite of RAID 1 + 0 programs. It is to partition and map data to two hard disks. It divides all hard disks into two groups and becomes the lowest combination of RAID 1. The two hard disks are regarded as RAID 0.

In terms of performance, RAID 0 + 1 has a faster read/write speed than RAID 1 + 0.

Reliability: when one hard disk in RAID 1 + 0 is damaged, the other three hard disks will continue to operate. RAID 0 + 1 as long as one hard disk is damaged, the other hard disk of the same RAID 0 group will also stop operating, with only two hard disks operating, with low reliability.

 

 

2.10 RAID50

The combination of RAID 5 and RAID 0 is RAID 5 first, and then RAID 0, that is, Stripe access is formed for each group of RAID 5. RAID 50 is based on RAID 5 and RAID 5 requires at least three hard disks. Therefore, a RAID 50 consisting of multiple groups of RAID 5 requires at least six hard disks. Taking the configuration of 6 hard disks with the minimum RAID 50 as an example, we first divide the six hard disks into two groups, each of which forms RAID 5. In this way, we can get two groups of RAID 5, then, the two groups of RAID 5 constitute RAID 0.

RAID 50 can still operate when one hard disk is damaged in any or multiple groups of RAID 5 at the underlying layer. However, if more than two hard disks are damaged in any RAID 5 group, the entire RAID 50 is invalid.

RAID 50 combines multiple groups of RAID 5 into a Stripe on the upper layer. The performance is higher than RAID 5 alone, while the capacity utilization is the same as RAID 5.

 

RAIDLevel

Number of hard disks required

Minimum number of Fault Tolerant Hard Disks

Available capacity

Performance

Security

Purpose

Application Industry

0

Limit 2

0

N

Highest

One hard disk is abnormal. All hard disks are abnormal.

Maximum capacity and speed

Real-time 3D rendering and video editing

1

Limit 2

Half of the total

Half of total capacity

Slightly improved

Highest

Maximum Security

Personal and Enterprise Backup

10

Limit 4

Half of the total

Half of total capacity

High

Highest security

Combining the advantages of RAID 0/1, the theoretical speed is faster

Large Databases and servers

5

Limit 3

1

N-1

High

High

Maximum capacity and minimum budget

Personal and Enterprise Backup

6

Limit 4

2

N-2

Slower than RAID 5

Higher security than RAID 5

Same as RAID 5, but safer

Personal and Enterprise Backup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.