红薯 选择 MySQL 用的服务器硬件配置
2011-10-12 09:15
471 查看
5 Minute DBA – Database Server Hardware Selection」讲了一些帮资料库选择硬体的方式,其实是偏向MySQL…
简单的说,CPU超过8 CPU其实意义不大,不需要买4*4core或是4*6core,因为MySQL目前无法利用到。
内存愈大愈好,内存现在便宜许多,如果有I/O bound的问题,除了改写程式外,直接把内存加到32GB或是64GB通常是最划算的方法。
硬盘愈快愈好,有Hardware RAID10 (要有电池)会比软体的RAID10好,不过这主要看需求,如果是CPU bound的应用,说不定SATA硬盘就够用?
网卡请务必用GigabitEthernet,最好是bounding/trunking,除了增加thoughput外,也可以当作redundant link。然后作业系统一定要选64bits,不然会受限于记忆体可定址空间。
5 Minute DBA – Database Server Hardware Selection
Posted onMarch 10, 2009
by Matthew Yonkovit
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!
相关文章推荐
- 如何为 MySQL 选择更合适的服务器硬件
- 如何为 MySQL 选择更合适的服务器硬件
- Mysql性能优化----SQL语句优化、索引优化、数据库结构优化、系统配置优化、服务器硬件优化
- MySQL性能优化五之系统配置优化和服务器硬件优化
- 如何选择最合适的服务器方案(一):服务器硬件配置
- 如何为 MySQL 选择更合适的服务器硬件
- web服务器硬件软件配置选择
- 服务器环境配置安装(mysql+redis+nodejs+nginx)
- 配置一个高可用性的MySQL服务器负载均衡群集
- MYSQL 主从服务器配置工作原理
- 么配置MySQL服务器
- 【Linux系统和服务管理】MySQL服务器安装与配置(二)
- PHP&MYSQL服务器配置说明
- 配置mysql5.5主从服务器(转)
- mysql数据库跨服务器查询【需要确定mysql支持FEDERATED ,可以参照文章内容自己配置】
- mysql数据库跨服务器查询【需要确定mysql支持FEDERATED ,可以参照文章内容自己配置】
- 【实战】新服务器mysql主从配置
- CentOS 6.4安装配置LAMP服务器(Apache+PHP5+MySQL)
- 搭建PHP5.4+Apache+Mysql 服务器环境配置方法
- 简单记录CentOS服务器配置JDK+Tomcat+MySQL