Question

I'm new to Mysql, and i'm reading this in a book: "A large log buffer allows large transactions to run without a need to write the log to disk before the transactions commit. Thus, if you have big transactions, making the log buffer larger saves disk I/O."

Ok...Perfect.. so i'm going to issue this statement:

set global innodb_log_buffer_size=xxx;
Mysql reply to me with: "ERROR 1238 (HY000): Variable 'innodb_log_buffer_size' is a read only variable"

So, How can i make it bigger in case i have big transaction, and need to increase the innodb_log_buffer_size?

I use mysql 5.7 on Windows.

Thank you.

Was it helpful?

Solution

The files are created when you first install MySQL. It is clumsy to change the size after that. In particular, the size cannot be changed dynamically.

How big is the setting now? How many rows with the one transaction be affecting? It may not be worth it.

If you do choose to make a change; see How to safely change MySQL innodb variable 'innodb_log_file_size'? Be sure to read the Comments, too.

Not Dynamic

https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_log_file_size says that innodb_log_file_size is not dynamic, meaning that your SET cannot work. You can change the value in my.cnf, but then you have the issues discussed above. A note from the 5.6.8 Changelog:

On startup, MySQL would not start if there was a mismatch between the value of the innodb_log_file_size configuration option and the actual size of the ib_logfile* files that make up the redo log. This behavior required manually removing the redo log files after changing the value of innodb_log_file_size. The fix causes MySQL to write all dirty pages to disk and re-create the redo log files during startup if it detects a size mismatch. (Bug #14596550)

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top