`

RAID 5 and MySQL is NOT recommended

 
阅读更多

http://www.razzed.com/2009/01/14/raid-5-and-mysql-is-not-recommended/

RAID 5 and MySQL is NOT recommended

First:

Formatting a drive using RAID 5 is a very big mistake when setting up a MySQL database server.

In case you missed that:

Unless you are running mission-critical banking transactions that can not for any circumstance be lost or else a whole bunch of people are going to die and RAID 5 is the only solution that works, then do not use RAID 5 for any database server where you wish to continue to get a modicum of performance in the long term.

Really. I work on a, shall we say, very high-transaction marketing tracking service which processes over 242 million transactions a month. And when I say “transactions”, I mean hits. And while the hits are not, say, as intense as downloading an image file, it adds up.

Some of it is discarded traffic from inactive sites, or refresh pages, but most of the data ends up being pumped into the database, constantly.

I have considered myself somewhat of a MySQL aficionado up until recently when I actually bought High Performance MySQL by Schwartz, Zaitsev, Tkachenko, Zawodny, et al. which is worth every penny of the cover cost, for sure. The section on key buffers in MyISAM is worth its weight in gold, and other sections reinforced a lot of stuff which I kind of knew but never really followed through on, and a ton of stuff which I never knew, and you really need to be a developer of MySQL to understand well, or be a full time DBA of MySQL, which I am afraid to say, I am becoming more and more.

February 2008 we upgraded our server farm and purchased two honkin’ ProLiant DL 380 G5 boxes loaded with memory and disk. Our system administration consultant, whom I’ll lovingly call “Jark“, set them up with RAID 5, 7 drives to the array with a hot spare, giving over 1.6 terabytes of storage, a vast increase over our prior 300 gigabytes. Fine and dandy. Everything ran smoothly for the first ten months.

Fast forward to December, when our client who receives the most traffic(10M page views per month) starts to slow everyone down. For a period of about 3 days, our data (which is real-time, ahem) was behind by about six to eight hours during the day, then only caught up to about four hours behind in the low periods in the morning.

I optimized, I profiled, I did everything I could to try and remedy the situation.

There’s a handy dandy little tool I have which shows how long it takes to pump a minutes worth of data into the database. On a good day, it takes about 10 seconds. The week in question, it was taking 60 to 100 seconds. Those rocket scientists out there can see that this was a losing performance.

And, to cap it all off I read in High Performance MySQL how businesses which fail to scale tend to fail. Gulp.

Oddly, the traffic patterns hadn’t changed significantly from the prior month. True, December is a banner month for most merchants, and our customers are no different, but I was starting to sweat. Jark (The administration consultant who set up the boxes originally) offered his high hourly rate to diagnose and check out the situation, which I begrudgingly paid … to no avail.

In the meantime, I asked our development team if there was some software solution for the issue. They have, in the works, a modified data import engine which eliminates the bottleneck for slow sites. However, this code was two months out, sayeth the lead developer. Could we ship it in the next few days? Not without a SNAFU afterwards because we haven’t tested it all. Ok.

Finally, after a few no-op downtimes with Jark where he did nothing, apparently, I asked him about the RAID configuration, having remembered a post on a blog (or MySQL.com) somewhere about which RAID to choose. I found a humorous (or not-so-humorous depending on your mood) organization called BAARFwhich I forwarded to him. His suggestion, “Maybe we should’ve done RAID 1.”

It was in reading this email that I believe sparks were flying from my back teeth.

Needless to say, Jark is no longer with us.

After painstakingly backing up the master database, reformatting and reinstalling the new slave system with RAID 10 (1+0), the system was back up with the newly formatted drives. When I pressed the magic button which starts up the database feeding, I watched the counter.

2 seconds. 3 seconds. 2 seconds. To import each minute.

On occasion, when things work too fast, I worry. It couldn’t be that fast. But the speed improvement was nothing short of miraculous.

The 8 hour delay was caught up in less than an hour.

分享到:
评论

相关推荐

    DELL服务器配置raid5+全局热备

    DELL 服务器 RAID5 配置与全局热备设置指南 本文档旨在指导读者如何在 DELL 服务器上配置 RAID5 并设置全局热备,以提高数据存储的安全性和可靠性。 在开始配置之前,需要了解 RAID5 和热备的概念。RAID5 是一种...

    如何在RAID 5的配置中添加硬盘

    在RAID 5配置中,它提供了数据容错能力,即使在阵列中有一个硬盘故障的情况下,也能保证系统的正常运行。本文将详细介绍如何在已有的RAID 5配置中添加硬盘。 一、RAID 5的工作原理 RAID 5使用分布式奇偶校验,每个...

    RAID0_RAID1_RAID10_RAID5

    RAID0_RAID1_RAID10_RAID5

    IBM X3650做RAID5的步骤

    IBM X3650服务器是一款高性能的企业级服务器,支持多种RAID配置,其中RAID5是一种常见的冗余磁盘阵列方式,提供了数据保护和性能优化。以下将详细阐述在IBM X3650上创建RAID5的步骤: 1. **硬件准备**: 在进行...

    raid5扩容与数据还原

    RAID5(独立磁盘冗余阵列5)是一种存储虚拟化技术,它将数据分散存储在多个物理磁盘上,并通过一定的算法计算出额外的校验信息,以实现数据冗余并提高可靠性。在RAID5阵列中,数据被分割成64K大小的块,并存储在多个...

    关于 RAID 5 与 热备份(Hot Spare)

    关于 RAID 5 与 热备份(Hot Spare) RAID(独立磁盘冗余阵列)是一种将多个磁盘组合成一个逻辑磁盘的技术,目的是提高数据存储的可靠性和性能。RAID 5 是一种常用的 RAID 级别,它提供了高效的数据存储和较强的...

    用r-studio软件恢复raid 5教程及说明

    ### 使用R-Studio软件恢复RAID 5教程详解 #### 引言 随着信息技术的不断发展,数据安全成为了企业和个人关注的重点。RAID技术作为一种提高数据可靠性和性能的方法,在服务器存储领域得到了广泛应用。其中,RAID 5因...

    教你组装raid5及raid1磁盘阵列服务器

    组装 RAID 5 及 RAID 1 磁盘阵列服务器知识点 一、引言 RAID(Redundant Array of Independent Disks)磁盘阵列技术是当前服务器存储解决方案中的热门话题。RAID 技术可以将多个物理硬盘组合在一起,以提高存储...

    Dell R710 服务器做Raid0与Raid5磁盘阵列的图文教程

    这次是在戴尔服务器R710上面尝试的做Raid0和Raid5,亲测成功。  因为创建Raid0与Raid5的方式是一样的,所以就以创建Raid5为例。  1,启动时,Ctrl+R键,进入Raid配置界面,如图(请注意,在此屏幕有操作提示,如果...

    HP_DL380_RAID5_配置方法

    RAID5 配置方法在 HP DL380 服务器中的应用 RAID5 配置方法是指在 HP DL380 服务器中使用 RAID5 技术来配置磁盘阵列的方法。该方法可以提高数据存储的安全性和可靠性。 一、自动配置方法 自动配置方法是指使用 HP...

    RAID5循环方向和同步异步讲解

    本文将深入探讨RAID5中的循环方向和同步异步概念,帮助读者更好地理解RAID5的工作原理。 首先,我们来了解RAID5的循环方向。在RAID5中,数据不是均匀地分布在所有磁盘上,而是采用一种称为条带化的策略。每个条带...

    Linux Raid 5 扩容学习笔记(精排编目)

    [root@RedHatLinux5Raid5 home]# mdadm --grow /dev/md2 --level=5 --raid-devices=4 ``` - **解析**:通过`--grow`选项,可以在RAID阵列中增加一个额外的磁盘,从而增加RAID 5分区的容量。这里的示例是增加了...

    在Window server 2008操作Raid5.docx

    ### Windows Server 2008下RAID5的创建与修复 #### RAID概念与分类 - **RAID**(Redundant Arrays of Independent Disks,独立磁盘冗余阵列)是一种通过组合多个物理磁盘来提高数据可靠性和/或性能的技术。 - **...

    RAID5技术手册

    ### RAID5技术手册详解 #### RAID5:存储与安全的平衡者 RAID5作为现代数据存储技术中的一种,以其独特的奇偶校验和并行传送技术,在存储性能、数据安全与成本之间找到了一个理想的平衡点。不同于RAID0、RAID1、...

    CentOS 7.4搭建RAID5及测试实例.docx

    CentOS 7.4 搭建 RAID5 及测试实例 本文将指导读者在 CentOS 7.4 系统中搭建 RAID5 阵列,并进行测试和维护。RAID(独立冗余磁盘阵列)技术可以将多个硬盘设备组合成一个容量更大的、安全性更好的磁盘阵列。通过...

    HP+DL380+RAID5+配置方法

    ### HP DL380 RAID5配置详解 #### 一、HP DL380服务器与RAID5概述 HP DL380是一款高性能的企业级服务器,广泛应用于数据中心和各种业务环境中。RAID5是一种常见的磁盘阵列技术,通过将数据分散存储在多个磁盘上,...

    raid5工作原理

    ### RAID5工作原理详解 #### 一、RAID5简介 RAID5是一种常见的磁盘阵列技术,它通过在多个磁盘上分散数据和奇偶校验信息来提高存储性能和数据冗余性。与RAID0或RAID1等其他RAID级别相比,RAID5提供了一个较好的...

    HP DL380 RAID5 配置方法

    配置RAID5阵列带来了许多优势,首先,通过磁盘条带化(striping)和奇偶校验(parity)技术,RAID5能够在发生单硬盘故障时保障数据的完整性和可用性,而不会影响整体系统性能。其次,由于RAID5阵列只需要一块磁盘的...

    LSI 8708E RAID卡创建raid5教程

    LSI 8708E RAID卡是一款高性能的企业级存储控制器,它支持多种RAID级别,包括RAID 0、1、1E、5、6、10、50和60,为用户提供数据保护和性能优化的选择。本文将详细阐述如何使用这款RAID卡创建RAID 5阵列,这是一种在...

Global site tag (gtag.js) - Google Analytics