mysql磁盘设置_mysql磁盘设置

Striping

Striping means that you have many disks and put the first block on the first disk, the second block on the second disk, and the N-th

block on the (NMOD number_of_disks)

disk, and so on. This means if your normal data size is less than the stripe size (or perfectly aligned), you get much better performance. Striping is very dependent on the operating system and the stripe size, so benchmark your application with different

stripe sizes. See Section 8.13.3,

“Using Your Own Benchmarks”.

The speed difference for striping is very dependent

on the parameters. Depending on how you set the striping parameters and number of disks, you may get differences measured in orders of magnitude. You have to choose to optimize for random or sequential access.

For reliability, you may want to use RAID 0+1 (striping plus mirroring), but in this case, you need 2 × N drives

to hold N drives

of data. This is probably the best option if you have the money for it. However, you may also have to invest in some volume-management software to handle it efficiently.

A good option is to vary the RAID level according to how critical a type of data is. For example, store semi-important data that can be regenerated on a RAID 0 disk, but store really important data such as host information and logs on a RAID 0+1 or RAID N disk.

RAID N can

be a problem if you have many writes, due to the time required to update the parity bits.

On Linux, you can get much better performance by using hdparm to

configure your disk's interface. (Up to 100% under load is not uncommon.) The following hdparm options

should be quite good for MySQL, and probably for many other applications:

hdparm -m 16 -d 1

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值