# Experience with  innodb\_flush\_method setting

**URL:** <https://forums.percona.com/t/experience-with-innodb-flush-method-setting/447>\
**Category:** Other MySQL® Questions\
**Created:** [September 12, 2007, 10:38am UTC](https://forums.percona.com/t/experience-with-innodb-flush-method-setting/447 "2007-09-12T10:38:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chriswest](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@chriswest](https://forums.percona.com/u/chriswest)\
**Post date:** [September 12, 2007, 10:38am UTC](https://forums.percona.com/t/experience-with-innodb-flush-method-setting/447/1 "2007-09-12T10:38:49Z")

</div>

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.)?

---

<div class="post-metadata">

**Author:** ![Peter](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/peter/32/2_2.png) [@Peter](https://forums.percona.com/u/Peter)\
**Post date:** [September 13, 2007, 11:38am UTC](https://forums.percona.com/t/experience-with-innodb-flush-method-setting/447/2 "2007-09-13T11:38:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chriswest](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@chriswest](https://forums.percona.com/u/chriswest)\
**Post date:** [September 13, 2007, 2:59pm UTC](https://forums.percona.com/t/experience-with-innodb-flush-method-setting/447/3 "2007-09-13T14:59:10Z")

</div>

Thanks a lot for your answer Peter!

I just don’t get the point about the BBU - I thought a BBU just helps in case of a power failure and keeps data in the cache until the machine is up again - why would O\_DIRECT benefit from it during “normal” operation? Or was the point all about enabling write cache on the raid controller which might result in data loss without a BBU and which, if disabled, would dramatically slow down O\_DIRECT?
