Bug #92541 Message about ib_logfiles are too small is incorrect
Submitted: 24 Sep 2018 8:33 Modified: 24 Sep 2018 9:24
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.7.23, 8.0.12 OS:Any
Assigned to: CPU Architecture:Any

[24 Sep 2018 8:33] Daniël van Eeden
Example message:

2018-09-24T07:13:24.465031Z 0 [ERROR] InnoDB: Cannot continue operation. ib_logfiles are too small for innodb_thread_concurrency 999. The combined size of ib_logfiles should be bigger than 200 kB * innodb_thread_concurrency. To get mysqld to start up, set innodb_thread_concurrency in my.cnf to a lower value, for example, to 8. After an ERROR-FREE shutdown of mysqld you can adjust the size of ib_logfiles. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html

This says that the 'combined size' should be bigger than 200kB * innodb_thread_concurrency.

in this case we have:
innodb_log_files_in_group = 2
innodb_log_file_size = 512M

So 'combined size' = 1024M
And 200 kB * 999 = 199800 kB = 195 MB

So the combined size is bigger than 200 kB * 999.

How to repeat:
Start with:
innodb_log_files_in_group = 2
innodb_log_file_size = 512M

And compare the message with the logic in log_calc_max_ages() in storage/innobase/log/log0log.cc

Things that seem to be missing from the message:
- That it is innodb_thread_concurrency+10.
- That it does a '/ 2' on smallest_capacity.

Suggested fix:
- Improve message to match the actual calculation a bit more.
- Print the calculated combined log file size.
[24 Sep 2018 9:24] Umesh Shastry
Hello Daniël,

Thank you for the report!

[25 Sep 2018 8:25] Simon Mudd
Also print the current number and size of the redo logs so there's no confusion as to which values MySQL thinks it's using.