数据库硬件选择

虽然大家使用的数据库可能不一样,但是整体的思路都是一样的。下面的文章对于选择数据库硬件有指导意义:

So you need to purchase a new database server, and you really don’t know where to start..

Because their maybe different recommendations for different OS’s I am going to stick with Linux with these recommendations. I want to say right off the bat here… choosing the right hardware should probably not be a five minute task. I think you really need to spend time reviewing your application, it’s access patterns, the io capacity, etc. You just can’t do this in five minutes generally. But if your under the gun and asked me to spec something out today… here are some general guidelines.

As of March 10th 2009 here is what I would recommend ( This are going to change every few months potentially with new versions of MySQL & new hardware:

CPU:
Currently the scalability of Innodb beyond 8 cores is limited, in fact with the current ( unpatched ) releases you may see a performance regression with more then 8 cores. We wrote about this before. If you have the money go with the fastest CPU’s available. Avoid servers with lots of cores and a lower speeds.

Memory:
The more memory generally the better. Here I would shoot for an amount of memory that will allow 100% of your hot data to be in memory. If you do not know how much data is going to be hot, a good guess in my experience is 10-20% of the total database size , but that’s going to vary from application to application. If you can’t figure out the total host data, more is better or a 20% rule of thumb is better then nothing. Minimally plan for 2-4GB of memory to be allocated to the OS. Typically I want at least 4GB of memory for the OS, and if I have a really active database I want more ( 8GB+ ). When I say 4GB for the OS, this will also be used for the MySQL Per thread buffers/thread stack, etc. So if you have a 24GB Database and all 24GB is hot or going to be used frequently I may put in 32GB of memory in my system and allocate 24GB to innodb and reserve the other 8GB for the OS and other items.

Disk:
Disk is going to be a toughy in 5 minutes. You really have two concerns here, Disk capacity & IO Capacity (think io’s per second). Disk capacity is generally pretty easy, I need XGB of disk space… most people can estimate this no problems. Keep in mind with RAID you will lose some raw disk capacity ( I.e. 4 160GB drives in a RAID 10 setup will deliver ~320GB of usable space ). A 5 minute answer to IO capacity is a bit more of a challenge. One of the descisions yo will need to make if you can get by with internal disk or you need a SAN. Just the other day Peter Z wrote about when to choose a SAN… give it a read. Assuming your making a decision in 5 mintes I am going to make an assumption that your going to look for internal disk. Purchasing the correct SAN in my opinion requires a lot of thought. So Let assume you want to use internal disk. First If all of your data fits into memory, it lessons your disk requirements a bit but it will not eliminate disk IO ( your still going to read and write to disk, but your reads should be lessened ). I strongly urge that you keep the database and OS completely separate. So that’s 2 disks for the OS ( mirrored disks should be fine ). For the database I typically recommend RAID10 for the data ( RAID 5 maybe OK for database with fewer writes, I.e. data warehouses ) which means a minimum of 4 disks for your database. So thats 6 disks to start with. You can then scale up from there as you need more, without more analysis your going to be guessing here. In terms of the type of drives, SAS or SCSI in either 10K or 15K speeds are pretty standard. I would avoid SATA drives that are <10K rpm. Of course this can all change, because it really depends on your needs and requirements… as I said tough!

Disk Controller:
Cache on your disk controller is important and the more the better in most cases. Make sure your controller has a battery backup, otherwise its really useless.

Network Cards:

Purchase at least two network cards for your system, both full 1GBE. Typically I would bond these two nics together to give some redundancy. Also avoid dropping your new server into a 100Mb/s network as well.

A quick note on the OS… make sure you install a 64 bit OS!

原文:http://www.bigdbahead.com/?p=158

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值