Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is innodb_buffer_pool_size & innodb_log_file_size?

Tags:

mysql

innodb

Can anyone tell me what is innodb_buffer_pool_size & innodb_log_file_size? What will happen after increasing it's sizes..

like image 969
Vee Avatar asked Jan 20 '10 09:01

Vee


People also ask

What should be innodb_buffer_pool_size?

Typically, a recommended innodb_buffer_pool_size value is 50 to 75 percent of system memory. innodb_buffer_pool_size can be configured dynamically, while the server is running.

What is the default innodb_buffer_pool_size?

innodb_buffer_pool_chunk_size is 128M , which is the default value. 8G is a valid innodb_buffer_pool_size value because 8G is a multiple of innodb_buffer_pool_instances=16 * innodb_buffer_pool_chunk_size=128M , which is 2G .

What is the use of innodb_log_file_size?

Innodb_log_file_size dictates the size in bytes of the commit log files stored by MySQL. Remember that these log files will protect database data during power loss events or crashes. For servers, with write-intensive workloads, the configuration of innodb_log_file_size is very important to performance.

Can we change innodb_buffer_pool_size in MySQL?

MySQL :: Resizing the InnoDB Buffer Pool Online. As described in the MySQL 5.7 manual here, we can now resize the buffer pool without restarting the mysqld process starting with MySQL 5.7. 5. You can now use the "SET GLOBAL innodb_buffer_pool_size = xxxx" command which causes a resizing job to begin in background.


1 Answers

innodb_buffer_pool_size is the amount of memory to use to cache tables, indexes and a few other things. This is the main tunable and you will want to set it quite high for performance reasons - there are plenty of resources discussing this.

innodb_log_file_size is the size of the commit log files (there are normally two of these), which does impact performance but not as much. Read the docs for more information.

The innodb_log_file_size should not be set to a value different from the size of the current files or the server won't start. This means that if you want to change it, you should shut the server down cleanly, delete the existing logs and it will create new ones.

On the other hand the logs should not be deleted if the database didn't shut down cleanly as it needs them to recover.

like image 110
MarkR Avatar answered Oct 11 '22 17:10

MarkR