Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change MySQL innodb_buffer_pool_size at runtime?

This may be a dumb question, but is it possible to change the MySQL configuration options such as innodb_buffer_pool_size at runtime?

Or, equivalently, is there a way to reload MySQL without closing existing connections or refusing new connections (like you can do with Apache)?

Linux_32 (2.6.26) + MySQL 5.0.24a

like image 757
RobM Avatar asked Dec 10 '09 12:12

RobM


People also ask

Can we change innodb_buffer_pool_size in MySQL?

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.

How do you set a buffer pool size?

The buffer pool size must be equal to or a multiple of innodb_buffer_pool_chunk_size * innodb_buffer_pool_instances . Changing those variable settings requires restarting the server. Active transactions and operations performed through InnoDB APIs should be completed before resizing the buffer pool.

What should innodb_buffer_pool_size be set to?

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?

Setting innodb_buffer_pool_size is dynamic in MySQL 5.7. The default value for innodb_buffer_pool_size is 128M (134217728).


1 Answers

According to this MySQL forum post, it is not possible to set innodb_buffer_pool_size at runtime.

So the question remains: is it possible to change the MySQL configuration and reload the daemon transparently to its users?

like image 158
RobM Avatar answered Sep 30 '22 06:09

RobM