Application of RAID in SQL Server (RAID level)

Source: Internet
Author: User

Enterprise-levelDatabaseMost applications are deployed inRAIDThe disk array server can improve the disk access performance and implement fault tolerance/disaster tolerance.
RAID (redundant disk array) is simply an array made of cheap hard disks. The objective is to expand storage capacity, improve read/write performance, and achieve data redundancy (backup and disaster tolerance ). It is like a foreigner who used to take N old PCs to form a powerful "server ".Cluster". RAID technology was born in 1987 and proposed by the University of California, Berkeley.
The main types include RAID 0, RAID 1, RAID 5, and RAID 10. Configuration is not very complex. If you are interested, you can find the relevant information and practice it on your own.

SQL Server 2005 has several commonly used levels:,. Below I will briefly talk about the differences between these levels and their applications.

RAID 0 is short for Disk Striping. It provides the best read/write performance. If you make two disks into RAID 0, when writing data, you can write data to disk A and disk B at the same time. Here, I must note: "You can write operations at the same time ",It does not mean that the same content of the file is "completely written to disk A and disk B at the same time ".. For example, if a M file needs to be written to a disk and the write speed of a single disk is 10 Mb/s, it takes 10 seconds to complete the write. However, in a raid 0 array environment with disks A and B, 10 MB of content can be written to disk A within A single time (in seconds/S, at the same time, the 10 MB content is immediately followed into disk B. In this case, the write speed is 20 Mb/s, which takes 5 seconds to complete, in addition, each disk only needs to store 50 MB of file content, which does not cause hard disk storage pressure. Of course, the Appeal example may be inappropriate, but it only refers to the theoretical environment. There are many other factors in the actual environment, and the efficiency is definitely not enough.
Undoubtedly, this will certainly improve the read/write performance, but it also brings about a problem that if some of the data is lost, all your data will not be retrieved, RAID0 does not provide a redundant data recovery policy. Therefore, RAID0 can be used in read-only database data tables or copied databases. If you are not sensitive to data loss, you can also use RAID 0, in short, this level is high-performance and non-redundant.

RAID 1 disk image has no impact on reading. If there are two disks, it only affects writing because it uses a disk for redundant backup, in this way, if you have two 50 GB disks, the total is 100 GB, but in RAID 1, you can only use 50 GB. This method will affect the disk space usage, reduces I/O write performance. Generally speaking, when you write a m file to RAID 1, the content is written to disk A and the same content is also written to disk B. In this way, the content of the two disks is completely consistent (the so-called "redundancy" is not a profound concept ). Originally, only one hard disk needs to be written, but now the efficiency will surely be reduced if two hard disks are to be written. For the "read" operation, only one hard disk is used for reading in the RAID 1 environment, so there is no difference with the normal environment (if both hard disks can work at the same time, ). Only when the data on the first hard disk is corrupted or fails, the second hard disk is started. Of course, if both hard disks are down, they will actually crash. Haha. In some books or articles, RAID 1 writes the first hard disk, the statement that the data is completely copied to the second disk as an image backup remains to be verified. According to my understanding, the data is copied and written at the same time.

  • 1
  • 2
  • Next Page

Related Article

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.