0

I am trying to run an application from my MariadDB installation, that needs a larger value for innodb_log_file_size. So I have set it to innodb_log_file_size=256M in /etc/my.cnf.d/server.cnf.

Now when I check for the set size with show variables like 'innodb_buffer%'; it tells me that the size is 134217728 which is 128M. So it doesn't seem to acknowledge my change...

Funny enough though, when I run my application (which is Rancher by the way), the iblogfiles are instantiated with a size of 256M.

Can anybody tell me why this is the case? My application doesn't seem to work properly and I'm not quite sure whether this is related...

appfrosch
  • 103
  • 1
  • 3

2 Answers2

0

The InnoDB buffer pool is different from the InnoDB log file, i.e. the undo log (a.k.a. the redo log), whose size is controlled by the innodb_log_file_size and innodb_log_files_in_group variables.

The buffer pool is a cache for frequently used data and indexes, so that MariaDB doesn't have to read them from disk. On the other hand, the undo log stores old versions of data being modified by write transactions.

If you need to change the size of the buffer pool, the variable to modify is innodb_buffer_pool_size. This is a dynamic variable starting with MariaDB 10.2, so can also be modified without restarting by executing a command like SET GLOBAL innodb_buffer_pool_size=32G;

dbdemon
  • 6,964
  • 4
  • 21
  • 40
0

Changing innodb_log_file_size is, until recent versions, one of the trickiest things to change.

Do you really need to change it? Do SHOW GLOBAL STATUS after the server has been running at least a day, then compute

Uptime / 60 * innodb_log_file_size / Innodb_os_log_written

If that is anywhere near 60 (minutes), leave the setting alone. If you decide to change it, see How to safely change MySQL innodb variable 'innodb_log_file_size'?

Rick James
  • 80,479
  • 5
  • 52
  • 119