Bug #63966 effective max innodb log file size is 2G, not 4G?
Submitted: 9 Jan 2012 9:13 Modified: 14 May 2013 13:46
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:any OS:Any
Assigned to: Bugs System CPU Architecture:Any

[9 Jan 2012 9:13] Hartmut Holzgraefe
Description:
Documentation says that the valid range for innodb_log_file_size is 108576 .. 4294967295 (100K - 4GB), but as there is a total upper limit of 4GB for

  innodb_log_file_size * innodb_log_files_in_group

and as innodb_log_files_in_group has a minimal value of 2 the effective
max. log file size is 4GB/2 = 2GB only ...

http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_log_file_size

How to repeat:
try to configure a working server with log file size >2G

Suggested fix:
change documentation to reflect the actual max. value, maybe change size checks in the server itself, too
[9 Jan 2012 11:26] Valeriy Kravchuk
Thank you for the documentation request.
[24 Oct 2012 10:29] James Day
Hartmut,

The documentation number is right but the text is misleading.

The number 4294967295 is 3.999999999068677 gigabytes, so you can't have a pair of 2G log files in 5.5 and earlier.

"The combined size of log files must be less than 4GB" is a misleading statement in the text part of the description because 4G is too high, it should say that it's a little under 4G and recommend using a pair of 2047M files to get close enough to the limit for the difference not to matter.

In 5.6 the limit is just under 512G and that should be enough for a few years. The variable can be set to 2^63-1 but it's reduced to full page increments, so you can't quite get that close to 512G. The 5.6 test is:

1897         if (srv_n_log_files * srv_log_file_size * UNIV_PAGE_SIZE
1898             >= 512ULL * 1024ULL * 1024ULL * 1024ULL) {
1899                 /* log_block_convert_lsn_to_no() limits the returned block
1900                 number to 1G and given that OS_FILE_LOG_BLOCK_SIZE is 512
1901                 bytes, then we have a limit of 512 GB. If that limit is to
1902                 be raised, then log_block_convert_lsn_to_no() must be
1903                 modified. */
1904                 ib_logf(IB_LOG_LEVEL_ERROR,
1905                         "Combined size of log files must be < 512 GB");

Try a pair of 255G log files if you want to get close enough to 512G in 5.6 for the difference not to matter much. Or go into a closer number of megabytes if you really need the extra almost two gigabytes that are available that way.

James Day, MySQL Senior Principal Support Engineer, Oracle
[14 May 2013 13:46] Bugs System
Revised reference manual content related to the maximum limit of innodb_log_file_size. Revisions made to 5.0, 5.1, 5.5, 5.6, 5.7 reference manuals.