A guide to configuring the size and instances of the InnoDB Buffer Pool to optimize memory usage and cache performance.
In MariaDB Enterprise Server, the InnoDB storage engine uses the Buffer Pool as an in-memory cache. The Buffer Pool caches pages that were recently accessed. If a lot of pages are being accessed sequentially, the Buffer Pool also preemptively caches nearby pages. Pages are evicted using a least recently used (LRU) algorithm.
The contents of the Buffer Pool can be reloaded at startup, so that InnoDB does not have to function with a "cold" cache after a restart. To support this, the page numbers of all pages in the Buffer Pool can be dumped at shutdown. During startup, the page numbers are read from the dump, and InnoDB uses the page numbers to reload each page from its corresponding data file.
The size of each page in the Buffer Pool depends on the value of the innodb_page_size system variable.
Starting with ES 10.5 and CS 10.5, the always has a single instance.
For additional information, see "".
This page describes how to configure the InnoDB Buffer Pool.
The size of the InnoDB Buffer Pool can be configured by setting the system variable. On ES nodes that exclusively use the InnoDB storage engine, the InnoDB Buffer Pool should usually be between 50%-75% of the memory available.
The method to configure the Buffer Pool size depends on whether a server restart are performed:
The size of the InnoDB buffer pool can be changed dynamically by setting the system variable using the statement. The statement requires the SUPER privilege.
To ensure that the change survives server restarts, the system variable should also be set in a configuration file.
To configure the InnoDB Buffer Pool with the statement, use the following procedure:
Connect to the server using MariaDB Client as the root@localhost user account or another user account with the SUPER privilege:
Set the system variable to the new size using the statement.
For example, to set the size to 2 GB:
Confirm that the resize operation has been completed by querying the status variable using the statement:
Choose a configuration file for custom changes to system variables and options. It is not recommended to make custom changes to Enterprise Server's default configuration files, because your custom changes can be overwritten by other default configuration files that are loaded after.
Ensure that your custom changes are read last by creating a custom configuration file in one of the included directories. Configuration files in included directories are read in alphabetical order. Ensure that your custom configuration file is read last by using the z- prefix in the file name.
Some example configuration file paths for different distributions are shown in the following table:
Set the system variable in the configuration file. It needs to be set in a group that are read by MariaDB Server, such as [mariadb] or [server]. When set in a configuration file, the value supports units, such as "M", "G", etc.
For example, to set the size to 2 GB:
The size of the InnoDB Buffer Pool can be changed by setting the system variable in a configuration file.
To configure the InnoDB Buffer Pool in a configuration file, use the following procedure:
Choose a configuration file for custom changes to system variables and options. It is not recommended to make custom changes to Enterprise Server's default configuration files, because your custom changes can be overwritten by other default configuration files that are loaded after. Ensure that your custom changes are read last by creating a custom configuration file in one of the included directories. Configuration files in included directories are read in alphabetical order. Ensure that your custom configuration file is read last by using the z- prefix in the file name.
Some example configuration file paths for different distributions are shown in the following table:
Set the system variable in the configuration file.
It needs to be set in a group that are read by MariaDB Server, such as [mariadb] or [server].
When set in a configuration file, the value supports units, such as "M", "G", etc.
For example, to set the size to 2 GB:
Restart the server:
The server can use the configuration change without a restart if you use .
This page is: Copyright © 2025 MariaDB. All rights reserved.
256 GB
128-192 GB
4 GB
2 GB
8 GB
4-8 GB
16 GB
8-12 GB
32 GB
16-24 GB
64 GB
32-56 GB
128 GB
Any ES Any CS
No
Any ES Any CS
No
CentOS RHEL Rocky Linux SLES
/etc/my.cnf.d/z-custom-mariadb.cnf
Debian Ubuntu
/etc/mysql/mariadb.conf.d/z-custom-mariadb.cnf
CentOS RHEL Rocky Linux SLES
/etc/my.cnf.d/z-custom-mariadb.cnf
Debian Ubuntu
/etc/mysql/mariadb.conf.d/z-custom-mariadb.cnf
64-96 GB
$ mariadb --user=rootSET GLOBAL innodb_buffer_pool_size=(2 * 1024 * 1024 * 1024);SHOW GLOBAL STATUS
LIKE 'Innodb_buffer_pool_resize_status';+----------------------------------+----------------------------------------------------+
| Variable_name | Value |
+----------------------------------+----------------------------------------------------+
| Innodb_buffer_pool_resize_status | Completed resizing buffer pool at 200904 17:49:48. |
+----------------------------------+----------------------------------------------------+[mariadb]
...
innodb_buffer_pool_size=2G[mariadb]
...
innodb_buffer_pool_size=2G$ sudo systemctl restart mariadb