Hello. I'm Ryan Mack, a new member of the Facebook MySQL team. My
first order of business is evaluating MySQL 5.1 and the new
InnoDB plugin. So far things look very promising, but I came
across one issue worth sharing.
Setting up two replicas of the same master, one running 5.0.84
and one running 5.1.38+1.0.4 showed the 5.1 server writing about
2x as much to disk, and having a little trouble keeping up the
master. Mark helped identify the insert buffer cache as the
likely culprit. SHOW INNODB STATUS showed 5.1 only had 10 pages
in the insert buffer and had a 1:1 insert to merge ratio, while
5.0 had over 16k pages and was getting a 4:1 reduction in merges.
Merging 4x as many pages into the secondary indexes was
definitely the problem.
In 5.0 the number of merges performed per background IO loop was
hardcoded to 5% of 100 IOPS. 5.1 has made this 5% of a variable
number of IOPS, configured with the innodb_io_capacity variable.
The …
[Read more]