EmergencyEMERGENCY? Get 24/7 Help Now!

Improving InnoDB recovery time

 | July 7, 2009 |  Posted In: Percona Software


Speed of InnoDB recovery is known and quite annoying problem. It was discussed many times, see:



This is problem when your InnoDB crashes, it may takes long time to start. Also it affects restoring from backup (both LVM and xtrabackup / innobackup)

In this is simple test, I do crash mysql during in-memory tpcc-mysql benchmark with 16 running threads.
MySQL params are:

So let’s take standard MySQL 5.4.1, it starts:

So you see it takes 1h 12 mins to start.

In XtraDB we made some improvements, and it shows:

1h 06mins. Better, but still not good.

So Yasufumi sat, scratched his head and made new patch for InnoDB. With this patch
mysqld starts:

6 mins 41 secs. 10x improvement. Something to think about.

The patch is not in official XtraDB tree yet, it lives in

The patch by itself is quite small, I would ask InnoDB experts to review it:


So your comments about patch is welcome! If it is stable it will go to XtraDB and XtraBackup.

Vadim Tkachenko

Vadim Tkachenko co-founded Percona in 2006 and serves as its Chief Technology Officer. Vadim leads Percona Labs, which focuses on technology research and performance evaluations of Percona’s and third-party products. Percona Labs designs no-gimmick tests of hardware, filesystems, storage engines, and databases that surpass the standard performance and functionality scenario benchmarks. Vadim’s expertise in LAMP performance and multi-threaded programming help optimize MySQL and InnoDB internals to take full advantage of modern hardware. Oracle Corporation and its predecessors have incorporated Vadim’s source code patches into the mainstream MySQL and InnoDB products. He also co-authored the book High Performance MySQL: Optimization, Backups, and Replication 3rd Edition.


  • Yasufumi rocks! But we don’t hear enough about his amazing work. I think Percona needs another person who spends all of their time explaining his changes to the rest of us.

  • Nice! 🙂 Last time I looked at the problem, I considered putting the whole structure into RB-tree, which would mean way way more code.
    Indeed, explaining some of the changes could be very nice thing to do %)

  • This is pretty cool !

    We should see how recovery math will work now – it may change the log files usable in production dramatically.

  • Amazing. The patch is really tiny, some explanation on how & why this works so beautifully will really help.

  • Awesome work!

    One question though: does this patch affect rollback time as well? Is it related to the crash recovery process?

  • Ok, ok,

    we are preparing explanation. Unfortunately for Yafusumi good explanation in English much harder than writing C code 🙂

  • Yasufumi made explanation how it works on this page

    Your comments are welcome.

Leave a Reply


Percona’s widely read Percona Data Performance blog highlights our expertise in enterprise-class software, support, consulting and managed services solutions for both MySQL® and MongoDB® across traditional and cloud-based platforms. The decades of experience represented by our consultants is found daily in numerous and relevant blog posts.

Besides specific database help, the blog also provides notices on upcoming events and webinars.
Want to get weekly updates listing the latest blog posts? Subscribe to our blog now! Submit your email address below and we’ll send you an update every Friday at 1pm ET.

No, thank you. Please do not ask me again.