← ServerPilot Docs

How to Increase the MySQL InnoDB Buffer Pool Size

The InnoDB buffer pool is MySQL's in-memory cache of the contents of tables and indexes.

For optimal performance, the InnoDB buffer pool should be large to hold the full contents of all databases. However, depending on the size of the databases and the performance requirements, it is not always financially practical to allocate that much memory to the buffer pool.

You can use ServerPilot's MySQL monitoring dashboards to know whether you need to increase the size of the InnoDB buffer pool.

Change the MySQL innodb_buffer_pool_size setting

The default value is 134217728 bytes (128MB).

Create file:

/etc/mysql/conf.d/innodb_buffer_pool_size.cnf

with contents (e.g. to double the default of 128MB to 256MB):

[mysqld]
innodb_buffer_pool_size = 268435456

restart MySQL:

sudo service mysql restart

Check the new value of the variable with:

sudo mysql -e 'SELECT @@innodb_buffer_pool_size'
Last updated: June 12, 2024

Launch your first site in 5 minutes