Bug #48341 | innodb_io_capacity set to high by default in InnoDB plugin | ||
---|---|---|---|
Submitted: | 27 Oct 2009 7:45 | Modified: | 29 Oct 2009 0:38 |
Reporter: | Oli Sennhauser | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server: InnoDB Plugin storage engine | Severity: | S3 (Non-critical) |
Version: | 1.0.4 | OS: | Any |
Assigned to: | Inaam Rana | CPU Architecture: | Any |
Tags: | DEFAULT, innodb, innodb_io_capacity, plugin, value |
[27 Oct 2009 7:45]
Oli Sennhauser
[29 Oct 2009 0:38]
Inaam Rana
Thank you to FB folks for noticing this. innodb_io_capacity controls not only the ibuf batch size but also the flushing rate of dirty pages. If the above situation is encountered then the workaround is to set the value of innodb_io_capacity to a lower value. A default value of 200 is already pretty conservative (it means a server can perform 200 IOPs). We'll make a note in the plugin documentation describing correlation between innodb_io_capacity and ibuf batch size. At this point we don't think changing the default for innodb_io_capacity is needed particularly because that will also affect the flushing rate of dirty pages.
[17 May 2011 18:07]
Chris Calender
Who is to say "a default value of 200 is already pretty conservative"? Is this documented somewhere, or do you have any basic benchmarks to prove this? From the research I've done, 200 seems a bit high for most standard disk drives. Just see the IOPS benchmarks here: http://en.wikipedia.org/wiki/IOPS#Examples http://storagearchitect.blogspot.com/2008/09/how-many-iops.html
[18 May 2011 19:07]
James Day
Chris, please see documentation bug #52393 and the request in bug #55818 for the ability to set innodb_io_capacity below 100. Also see bug #59214. It's impossible to set one value that's always right but we can document what influences the need for the setting and how it might usefully be adjusted to strike the best balance. I generally want to start as low as possible (currently 100) and only increase when there's a demonstrated need to do so. It's worth checking the version and using the most recent version possible within each major release. More specifically, in 5.5 there were some tweaks done to various things in the release or two after GA that reduced some flushing work, see the release notes for more. It's also worth having a look at 5.6 and the recent 5.5 release notes to see some of the adjustments that help to make the server better at adjusting its own settings. Things like increasing the change buffer merge rate when it becomes too full, so it is less likely to get completely full and lose its ability to greatly speed up inserts. All of these things are the subject of lots of discussion and investigation, specifically including insert buffer merge rate, flushing and purging. The server defaults are a compromise. The changes in 5.5 and 5.6 are making that compromise better and it might be possible to reduce innodb_io_capacity in 5.6 defaults if we can work through everything needed to keep it lower and have the server automatically increase what it does when necessary. SSDs are one of the challenges there, since they have high io capacities but are available in very inexpensive systems.