Wrong Redo Log Space reported in the InnoDB Details dashboard
Description
How to test
How to document
Attachments
Activity
Vinicius Grippa December 9, 2024 at 5:20 PM
I have run some tests, and we can use the Innodb_redo_log_capacity_resized
as the source of truth. With this global setting, checking which parameter was set to configure the redo log capacity won't be necessary.
Fernando Laudares Carmagos October 16, 2024 at 12:51 PM
Until the old innodb_log_file* variables are deprecated, we must consider the conditions documented in the MySQL manual:
innodb_redo_log_capacity
supercedes theinnodb_log_files_in_group
andinnodb_log_file_size
variables, which are both ignored ifinnodb_redo_log_capacity
is defined.If
innodb_redo_log_capacity
is not defined, and if neitherinnodb_log_file_size
orinnodb_log_files_in_group
are defined, then the defaultinnodb_redo_log_capacity
value is used.
If innodb_redo_log_capacity is “customized” by the user (meaning it is set to a different value than the default one), MySQL will use it as the value for the redo log space, always.
If innodb_redo_log_capacity has not been customized but either innodb_log_file_size or innodb_log_files_in group is customized, then the redo log space is defined by the product of the two innodb_log_file* variables.
If neither of the three variables above is defined, then the default value for innodb_redo_log_capacity is used to define the redo log space.
Aaditya Dubey September 27, 2024 at 11:39 AM
Hi
Thank you for the report.
It is verified as described.
Roma Novikov September 26, 2024 at 7:59 AM
It looks like the fix in wasn’t a full fix.
, PTAL
The InnoDB Details dashboard shows the wrong Redo Log Space at the top of the page. It is still calculted as innodb_log_file_size * innodb_log_files_in_group that is good if MySQL < 8.0.30.
For MySQL >=8.0.30 we should consider innodb_redo_log_capacity instead
The real size of the redo logs is correctly reported in the InnoDB Log File Usage Hourly box.
The following formula should work.
(mysql_version_info{innodb_version=~"8.[0-9].[3-9][0-9]",service_name=~"$service_name"} != 1 and avg by (service_name) (mysql_global_variables_innodb_log_files_in_group{service_name=~"$service_name"} * mysql_global_variables_innodb_log_file_size{service_name=~"$service_name"}) ) or (avg by (service_name)(mysql_global_variables_innodb_redo_log_capacity{service_name=~"$service_name"}) unless (mysql_version_info{innodb_version=~"8.[0-9].[3-9][0-9]",service_name=~"$service_name"} == 1))