SQL服务器的最佳RAID设置 [英] Optimal RAID setup for SQL server

查看:129
本文介绍了SQL服务器的最佳RAID设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的网站有一个SQL 2005数据库后端,目前大小为10GB。



我们正在升级我们的数据库服务器,我想要获得4个磁盘和将它们设置在两个RAID 1阵列中 - 一个用于数据文件,另一个用于操作系统和日志文件。这将是最佳设置还是RAID 5会更好的数据文件? RAID 10有点贵,对我们来说可能太贵了。



在这个阶段,SQL Server应该将大部分数据库保存在RAM(8GB)中,所以我不想完全依赖于这一点。



编辑:我们肯定希望在生产服务器上的冗余,因此RAID 0本身就没有了。 RAID 10很好,但对我们来说可能有点贵。

解决方案

使用独立RAID 1镜像的概念是正确的



我们在我的工作中实施了类似的方案,效果非常好。



RAID 1



RAID 1为您提供1个磁盘的写入速度,但有2个磁盘可供读取。



将数据写入RAID 1阵列时,必须将数据写入两个磁盘,因此不会提高性能,但这是您获得数据安全的地方。



从RAID 1阵列读取时,控制器将从两个磁盘读取,因为它们具有相同的数据。



RAID 5



这有助于保护更大量的数据。对于相同的数据量,RAID 5的成本比RAID 1(或RAID 0 + 1)的成本要慢得多。



如果您想使用RAID 5保护600Gb,您可以使用4x200gb驱动器或3x300gb驱动器来实现,需要800-900gb的总购买驱动器空间。 RAID 1将是2x600gb驱动器需要1,200gb的购买空间(600gb驱动器相当昂贵)或RAID 0 + 1,允许您使用较便宜的容量驱动器(即:4x300gb或6x200gb),但仍需要总共1,200gb



具有与RAID 1相似的优点拿起它与磁盘条纹的另一个缺口。我假设如果你担心更高的同步读取,你也将使用多处理器/多核。您将一次处理多个查询,因此条带不会帮助那么多。对于使用大型数据文件(例如视频编辑)的单个应用程序,您会在RAID 0 + 1上看到更好的优势。



当我在研究同一个问题时对于客户,我发现这篇文章非常有趣 http:/ /blogs.zdnet.com/Ou/?p=484 。在第二页上,他讨论了从RAID 0 + 1到独立RAID 1阵列的改变,创造了很多性能改进。这是一个更大的规模(20磁盘和16磁盘SAN),但相同的概念。 SQL Server负载平衡多个卷之间的数据的能力,而不是仅仅使用RAID 0 + 1的基本不知情的条带化是一个伟大的概念。


We have an SQL 2005 database backend for our website, currently about 10GB in size. There are a lot more reads than writes, though I don't have the exact statistics.

We're upgrading our database server and I was thinking of getting 4 disks and setting them up in two RAID 1 arrays - one for the data files and the other for the OS and log files. Would this be the optimal set-up or would RAID 5 be better for the data files? RAID 10 gets a bit pricey and is probably overkill for us.

At this stage SQL Server should keep much of the database in RAM (8GB), but it will grow, so I don't want to entirely rely on that.

Edit: we definitely want redundancy on a production server, so RAID 0 by itself is out. RAID 10 is nice, but might be a bit expensive for us.

解决方案

Your concept of using independent RAID 1 mirrors is the correct strategy.

We have implemented similar scenarios at my work and they work very well.

RAID 1

RAID 1 gives you the speed of 1 disk for writing but 2 disks for reading.

When you write data to a RAID 1 array, it has to write that data to both disks, so you do not gain any performance increase, however this is where you get your data security.

When reading from a RAID 1 array the controller will read from both disks as they have the same data on them.

RAID 5

This is useful for protecting larger amounts of data. The cost of RAID 5 increases a lot slower than RAID 1 (or RAID 0+1 once you are doing capacities beyond the size of the individual disks) for the same amount of data.

If you want to protect 600gb in with RAID 5 you can achieve that with 4x200gb drives or 3x300gb drives, requiring 800-900gb of total purchased drive space. RAID 1 would be 2x600gb drives requiring 1,200gb of purchased space (with 600gb drives being quite more expensive) or RAID 0+1 allowing you to use less expensive capacity drives (ie: 4x300gb or 6x200gb) but still requires a total of 1,200gb of purchased space.

RAID 0+1

Offers similar advantages as RAID 1 taking it up another notch with the striping across disks. I am assuming that if you are concerned about higher simultaneous reads, you will also be using multi-processors/multi-cores. You will be processing multiple queries at once and so the striping isn't going to help as much. You would see a better advantage on a RAID 0+1 for single applications using large data files, such as video editing.

When I was researching this same issue a while ago for a customer I found this article to be very interesting http://blogs.zdnet.com/Ou/?p=484. On the second page he dicusses the change from a RAID 0+1 to independent RAID 1 arrays creating a lot of performance improvements. This was on a much larger scale (a 20 disk and 16 disk SAN) but same concepts. The ability for SQL Server to load balance the data between multiple volumes instead of using just basic uninformed striping of RAID 0+1 is a great concept.

这篇关于SQL服务器的最佳RAID设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆