MySQL 5.5 performance - compare with MySQL 5.1 with innodb plug-in stock MySQL 5.1 has the old innodb less lock contention around cache - no scanning for free slot - free list innodb - log system mutex split into two - heavy log writes can still cause contention - hasn't completely solve the problem - buffer pool flush list is hot by design has its own Mutex - can create multiple buffer pools - pages hash across pools - try to spread hot pages around (the root index page is always hot) - many pools can increase internal overhead - transactions in-flight need a rollback segment - can limit the number of outstanding transactions - also source of contention use 'innodb show shutdown' (?) for upgrade use native asynchronous I/O on Linux - pushes burden of merging I/O to kernel - can make crash recovery one a half times faster. Change buffer - had insert buffer to optimize inserts. - Extended to update and delete operations. - Up to 40 times more performance for large deletes. Separate purge thread - in mySQL previous to version 5.1, the main thread does everything. - In version 5.5 there is a separate thread for purging. - There are more stalls without purge thread. - Set the 'innodb_purge_threads=1' conf variable to enable - the "history length" problem: long-running transaction causes undo space to fall out of buffer pool and go to disk this makes purging I/O bound. Enabled by default in persona server. Adaptive Flushing - this is not a new feature but gets lots of work done to it in version 5.5. - Deals with multiple buffer pools. - Should be even smoother on version 5.5. Performance schema - this schema has some overhead when enabled. - Allows you to better understand sources of problems. There are some cases when version 5.5 is slower there are some system bench regressions, some user complaints. However there are no big regressions known as of now. Remaining issues - per index lock causes problems with high updates -- solution is to use partitioning. - Kernel mutex is the focus is in version 5.6. - We will find out as we go along what other problems there are MySQL 5.5. - Dropping a table with file per table. - Scans whole buffer pool. - Nasty with large amounts of memory. - Fixes in Percona server possibly version 5.5 they were not sure. - Facebook has a patch for locking during drop table. version 5.5 is often faster than Percona MySQL 5.1. Percona MySQL 5.5 is in beta. Working on getting good performance with a solid-state drive. It will be a couple of months for the first percona 5.5 release. The hope is to have it done by the MySQL conference in April.