InnoDB often assumes the use of spindle hard drives for storing data, so it makes the best effort to reduce random access, and opt for sequential access whenever possible. Nowadays, a lot of MySQL instances in production use SSD Flash drives, so the benefit of these design decisions are gone, and may cause some overhead.
Does the current development of InnoDB take this into consideration? Is there any configuration option for tuning the performance for SSD drives?
There are a few tunables that directly impact SSD versus spinning drives:
innodb_flush_neighbors = OFF -- since there is no "rotational delay"
innodb_random_read_ahead = OFF
innodb_io_capacity = 2000
innodb_io_capacity_max = 4000
innodb_page_size - Using a smaller size _may_ help if _all_ tables are
accessed randomly _and_ have small rows. (not for the faint of heart)
I don't have "good" numbers for the numeric values, and they depend on the performance characteristics of the SSD/Flash.
There may be more settings. I don't know, for example, about innodb_read_io_threads
and innodb_write_io_threads
. (Default 4, max 64.)
A Battery-Backed Write Cache on the RAID controller makes writes essentially instantaneous. This is also a factor
8.0 (the latest version) has some "cost" parameters that apply to disk versus RAM access. They are manually tunable. (Sorry, I don't have the details.) I have implored the developers to make them self-tuning.
Keep in mind that if you are "at the limit" of such tunables, you won't have much room before the system collapses.
Keep in mind that optimizing indexes and queries often gives the biggest bang for your buck.