| Experience with innodb_flush_method setting [message #1803] |
Wed, 12 September 2007 12:08  |
chriswest Messages: 14 Registered: August 2007 |
Junior Member |
|
|
I just wanted to ask about your experience with the innodb_flush_method setting since I usually went with
innodb_flush_method = O_DIRECT
Recently, while working with new machines, same kernel but a different Raid Controller / HD Setup, I've noticed a heavy performance drop while using O_DIRECT. Trying O_DSYNC was the same. Using the default flush method (not using the innodb_flush_method setting) worked well instead...
Any suggestions or experiences about this setting on different setups (linux kernel versions, raid setups, etc.)?
|
|
|
| Re: Experience with innodb_flush_method setting [message #1820 is a reply to message #1803 ] |
Thu, 13 September 2007 13:08   |
Peter Messages: 405 Registered: August 2006 |
Senior Member Super Guru |
|
|
O_DIRECT bypasses OS cache for reads and for writes.
Typically it can slow down things in case
1) Your buffer pool is too small (so caching in OS gives benefit)
2) You do not have battery backed up cache on RAID - flushing data may become much slower with O_DIRECT in this case as OS will be unable to reorder page write requests.
Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
|
|
|
|
| Re: Experience with innodb_flush_method setting [message #1829 is a reply to message #1822 ] |
Fri, 14 September 2007 06:50  |
Peter Messages: 405 Registered: August 2006 |
Senior Member Super Guru |
|
|
If you have correctly configured box your drive/RAID cache will be write-through if you do not have BBU. Otherwise it is very easy to get database and journaling file system toasted on power failure.
so BBU usually makes a difference between cache operating in write back and write through mode which makes a lot of difference.
Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
|
|
|