DBA should know about raid cards

Source: Internet
Author: User

For special applications such as databases, iops often becomes a bottleneck. There are not many effective methods to break through this bottleneck. The main software aspects are read/write splitting, vertical splitting, partition table technology, and cluster. The hardware is mainly raid and SSD.

Usually software and hardware are optimized at the same time. Compared with the test, the hardware uses raid more often. Today, we will share the hardware raid knowledge.

What is raid?

Raid can provide data backup technology, expand storage space, and improve storage performance. The following are commonly used RAID 0, RAID 1, RAID 0 + 1, RAID 1 + 0, RAID 5 simple introduction, detailed knowledge can be Google, or refer to: Raid.

RAID 0

This raid level provides the highest throughput for write operations, but it has internal redundancy. Because backup files are the bottom line for protecting data, but datasets are not redundant, I do not recommend this type.

Raid 1

This raid level also provides higher I/O throughput and a redundant copy. The disadvantage is that the Data Partition Size Using RAID 1 is limited by the size of your physical disk. One option is to write your backup file to multiple independent RAID 1 arrays, which may further increase I/O throughput by using different controllers or channels.

RAID 5

Using RAID 5 causes some write performance loss, because parity verification is required. If you really want to make the backup process run faster, this raid level may not work.

Raid 10

With the raid 10 solution, you will get the advantages of both RAID 0 and RAID 1. The disadvantage is that the implementation cost is very expensive. But the advantage is that your I/O throughput will be very fast. Since raid 10 uses all the drives in the array for higher I/O utilization, the more drives in the array, the more performance increases.

In addition to the raid level, there are other factors to consider:

Controller

When setting your raid array, try to isolate different types of I/O interactions from different controller cards or different channels of controller cards. In addition, the better the controller card, the better the performance.

Disk speed

The disk drive has multiple speeds. Currently, SCSI drives can run at least rpm, which is faster than ide drives. In most cases, enterprise-level servers may adopt SCSI technology, which is a better choice.

Disk capacity

You can now get several larger GB drives. If you want to store a large amount of infrequently accessed data, there is no problem. However, the large disk capacity cannot be helpful for writing large amounts of data as quickly as possible. Increasing the number of disks in the array is more advantageous than increasing the number of disks with a very large capacity.

For database applications, we usually select raid1 + 0. He is similar to RAID5 in terms of disk space cost and security, but is superior to RAID5 in terms of performance (iops). Therefore, we generally use raid1 + 0 for OLTP systems.

Now let's start with the topic: Raid hardware knowledge. Of course, we just discuss the performance and security of RAID hardware from the perspective of applications.

Cache

Cache is essential for a high-end raid. Generally, the DDR2 memory particles used by raid cards are almost the same as our memory. The adaptec cache is called dram, and ddr3 will certainly keep up with the development of hardware technology.

When it comes to caching technology, we must talk about two cache modes.

Write Through system write requests are directly written to the hard disk, which is highly secure and has low performance.

Write back system write requests are first stored in the cache, and then unified back to the hard disk according to the time. Because the cache write speed is much higher than the disk, this method can greatly improve the performance.

Bbwc

In order to mine for better raid Write Performance, ELE. Me DBAs certainly want to enable the write back function to let our database fly. However, there was a very serious security problem at this time, that is, the problem of data loss caused by sudden power outages (previously mentioned that the raid card uses RAM memory and data loss caused by power outages, however, the system layer has considered that the data has been written to the hard disk, so the system layer cannot provide any protection measures.) data loss is certainly unacceptable for DBAs. What should we do?

For this problem, bbwc-battery-backed write cache occurs. the core of bbwc is the bbu battery backup unit, which is a lithium battery. It is in the charging status when the system is started up. In case of power failure, the cache will be provided with the current required for refreshing, keep data intact until the data is written back to the disk at next boot. Some bbu and raid cards have memory in one module, while some raid cards connect to one battery through one connection line.

Disadvantages of bbwc:

1. Electromagnetic replacement and maintenance are required every 1-2 years. administrators may easily forget this issue. If the computer room is not far away from the computer room, the cost will be high.

2. The replacement of the electromagnetic field requires shutdown, and the machine must be dismounted and disassembled.

3. Because the battery is also a fault point, the administrator needs to spend more time concerned about the work of the electromagnetic field.

4. The battery can provide a maximum of 72 hours of power supply. Initialization takes several hours to charge.

5. Environmentally friendly battery

Fbwc

Fbwc-flash-based write cache is introduced in view of the disadvantages of bbwc.

The principle of fbwc is to use the power stored in a group of "super capacitors" in a short period of time (about 1 minute) when a power outage occurs outside the system ), back up the cached data to the large-capacity FLASH memory on the raid card until the data is written back to the hard disk after the next boot.

Fbwc and bbwc have almost the same purpose, but their implementation methods are different.

Advantages of fbwc:

1. No maintenance is required. This will solve the problem for administrators.

2. data can be stored in flash for many years

3. The system can be started.

4. Environmental protection

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.