Mysql – How to decrese MySQL Innodb crash recovery time (force MySQL to do it faster)

crashinnodbMySQLrecovery

I'm running MySQL 5.7 with 1GB of innodb_log_file_size on CentOS 7 x64 and I can't change the value of that parameter right now.
In the case of crashes, it takes about 20 minutes to recover, but within this 20 minutes mysql process doesn't seem to use system resources efficiently (i.e. it has a very mild CPU usage).
I need to know is there any way to force MySQL to do this process a little bit faster using configuration parameters? (for example by increasing number of recovery threads or allocating more RAM space)

Best Answer

First of all there is a documented bug that has seen the recovery performance of 5.7 degrade, this is discussed here https://bugs.mysql.com/bug.php?id=80788 which seems to have been fixed in 5.7.19

Otherwise, these suggestions might help:

https://www.percona.com/blog/2016/06/07/severe-performance-regression-mysql-5-7-crash-recovery/

https://www.percona.com/blog/2014/12/24/innodb-crash-recovery-speed-mysql-5-6/

Although these are on the Percona blog it is not specific to Percona. There are other performance suggestions on the blog, but as you already realise these largely relate to the setting of innodb_log_file_size

Disclosure: I work for Percona.