[MDEV-18986] innodb_log_file_size limits incorrectly stated in KB Created: 2019-03-21  Updated: 2021-01-13  Resolved: 2021-01-13

Status: Closed
Project: MariaDB Server
Component/s: Documentation - Support
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Juan Assignee: Juan
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

innodb_log_file_size states:
"The combined size can be no more than 4GB prior to MariaDB 10.0, and no more than 512GB in MariaDB 10.0 and later."

Testing on MariaDB 5.2.12 shows that 2 files of 17179869185 (16G+1) are successfully created when defined:

[mysqld]
innodb_log_file_size=17179869185

on CentOS 7.5 64-bit

*Did not have sufficient space to test the second claim in that sentence: "no more than 512GB in MariaDB 10.0 and later."



 Comments   
Comment by Daniel Black [ 2019-03-21 ]

The 512G is enforced as an innodb limit:

$ mkdir /tmp/datadir && scripts/mysql_install_db --no-defaults --srcdir=${OLDPWD} --builddir=${PWD} --datadir=/tmp/datadir --log-bin=/tmp/datadir/mysqlbin --verbose --innodb_log_file_size=$(( 1024 * 1024 * 1024 * 600 ))
Installing MariaDB/MySQL system tables in '/tmp/datadir' ...
2019-03-21 15:10:32 0 [Note] /home/dan/build-mariadb-server/sql/mysqld (mysqld 10.4.4-MariaDB-log) starting as process 33894 ...
2019-03-21 15:10:32 0 [ERROR] InnoDB: Combined size of log files must be < 512 GB
2019-03-21 15:10:32 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-03-21 15:10:32 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-03-21 15:10:32 0 [ERROR] Unknown/unsupported storage engine: InnoDB

Changing the limit is easy enough. Allocation on creation is rather quick with fallocate. Recovery time, well. that's a bit more.

Comment by Jacob Moorman (Inactive) [ 2019-04-12 ]

Juan: MariaDB 5.2 is EOL. Is there a reason the documentation should cover this older version?

Comment by Geoff Montee (Inactive) [ 2019-04-12 ]

A quick look at the XtraDB code in MariaDB 5.5 shows that it uses the unsigned long int data type to calculate the log capacity:

https://github.com/MariaDB/server/blob/mariadb-5.5.63/storage/xtradb/log/log0log.c#L698

https://github.com/MariaDB/server/blob/mariadb-5.5.63/storage/xtradb/log/log0log.c#L873

https://github.com/MariaDB/server//blob/mariadb-5.5.63/storage/xtradb/include/univ.i#L387

On my Linux system, it looks like the max size of this data type depends on whether it's compiled as 64-bit or 32-bit:

#  if __WORDSIZE == 64
#   define ULONG_MAX    18446744073709551615UL
#  else
#   define ULONG_MAX    4294967295UL
#  endif

The 32-bit vs. 64-bit difference might be one reason that the documentation includes this warning.

We might need input from marko on what the proper behavior is in MariaDB 5.5, which is the only version prior to MariaDB 10.0 that is still supported.

Comment by Marko Mäkelä [ 2019-04-16 ]

It looks like there indeed was a bug with the log file size calculations in MariaDB 5.5 and earlier on 32-bit systems. It was fixed in MySQL 5.6.3 and merged to MariaDB Server 10.0.

The maximum size of the InnoDB redo log should be 512 GiB even in MariaDB 10.4. This might change in MDEV-14425.

Comment by Ian Gilfillan [ 2021-01-13 ]

5.5 and 10.0 are both EOL now, and the documentation has moved on, so this no longer seems relevant

Generated at Thu Feb 08 08:48:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.