Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Speed up MyISAM to InnoDB conversion – Percona / MySQL 5.6

A recent attempt at converting a 1.8GB database from MyISAM to InnoDB ran past 5 hours which triggered this quest to look for tweaks to improve the conversion speed. I was able to bring down the conversion time from 5+ hours to a mere 8 minutes.

my.cnf

innodb_buffer_pool_size = 4G
innodb_log_buffer_size = 256M
innodb_log_file_size = 1G
innodb_write_io_threads = 16
innodb_flush_log_at_trx_commit = 0

You may need to play with the settings above to suite your environment.

Once this is done, restart mysql with the following command to disable InnoDB Double Write Buffer. You want to do this before start converting the database:

service mysql restart --innodb-doublewrite=0

Once your done restart normally:

service mysql restart