简体   繁体   English

mysql innodb:innodb_flush_method

[英]mysql innodb:innodb_flush_method

in the following link 在以下链接中

http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_flush_method http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_flush_method

it says:Different values of this variable can have a marked effect on InnoDB performance. 它说:这个变量的不同值可以对InnoDB性能产生显着影响。 For example, on some systems where InnoDB data and log files are located on a SAN, it has been found that setting innodb_flush_method to O_DIRECT can degrade performance of simple SELECT statements by a factor of three. 例如,在InnoDB数据和日志文件位于SAN上的某些系统上, 已发现将innodb_flush_method设置为O_DIRECT会使简单SELECT语句的性能降低三倍。

Why O_DIRECT could slow down the select statement? 为什么O_DIRECT会降低select语句的速度?

O_DIRECT bypasses the OS's cacheing systems. O_DIRECT绕过操作系统的缓存系统。 A SAN may be a very fast storage system, but generally it's going to be somewhere else over a network link and proxied/hidden behind various other layers. SAN可能是一个非常快速的存储系统,但通常它将通过网络链接在其他地方并代理/隐藏在各种其他层之后。 By using O_DIRECT, which eliminates local cacheing, you force InnoDB to hit the storage system directly every time. 通过使用消除本地缓存的O_DIRECT,您可以强制InnoDB每次都直接访问存储系统。

You really need to experiment with the flush method on your hardware to see what works best for you. 您真的需要在硬件上试验flush方法,看看哪种方法最适合您。 Setting: 设置:

innodb_flush_method = O_DIRECT innodb_flush_method = O_DIRECT

Improved our performance by 15% on a Dell 2950 server with 15K RPM SAS drives configured in RAID 1 configuration with Dell's PERC caching controller. 使用戴尔PERC缓存控制器在RAID 1配置中配置15K RPM SAS驱动器的Dell 2950服务器上,我们的性能提高了15%。 We're running Ubuntu 9.04 stock kernel and most of the work is mysql using innodb. 我们正在运行Ubuntu 9.04库存内核,大部分工作都是使用innodb的mysql。 Your mileage may vary. 你的旅费可能会改变。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM