Friday, March 13, 2009

Another MySQL patch

I published the V3 Google patch. This has:
  • global transaction IDs
  • batch key access
  • much better SMP performance for SHOW USER_STATS
  • more changes to improve SMP performance. Changes were made to reduce contention on log_sys->mutex and buffer_pool->mutex.
  • checksums on binlog events
It probably has many other features, but I have yet to go through my release notes to remember everything that has been changed. Community and official MySQL developers are the intended audience for this. I am thrilled that Percona has been able to enhance some of the code released in previous patches, and that some of these changes made it into the InnoDB 1.0.3 plugin and that semi-sync replication will be in MySQL 6.0 (after a lot of work by MySQL to implement the right way).

Update 1 -- Domas asked about the overhead from using crc32 rather than adler32 for checksums. I did not measure any difference. Using checksums reduces performance by 3% to 7%. Details on the change and performance results are here.

Update 2 -- the latest SMP changes by Ben Handy improve sysbench readwrite performance by 20% at high levels of concurrency. My results are here.

Update 3 -- we backported batch key access from MySQL 6. Details are here.

7 comments:

  1. Woot! More fun stuff to play with.

    ReplyDelete
  2. Sweet..... can't wait to get these in our build.

    Specifically the binlog checksums.

    ReplyDelete
  3. Great news! Global transaction IDs make for quite a revolution, and binlog checksums are much required.
    Good work!

    ReplyDelete
  4. "batch key access" - is this a backport of the batched key access join type from MySQL 6.0? Or is it something else?

    ReplyDelete
  5. Your patch is growing big, 153k line patch :)
    Lots of great stuff, I particularly liked the
    new combination of buf_flush_list mutex and
    log_sys mutex which seems to be a surgery
    change. Small but very effective.

    Any particular reason you didn't adopt the
    Percona approach of using a RW-lock for the
    buffer page hash mutex?

    ReplyDelete
  6. The rw-lock wasn't used for the buffer page hash mutex because we didn't try to figure out whether it was needed for our workloads. Ben has already moved on to getting the pool-of-threads backport in MySQL 5.0 to scale.

    ReplyDelete

 
Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.