Wednesday, 25 July 2018

MySQL: Script to determine the size of innodb_buffer_pool_size

In this post, I am providing a script for determining the size of innodb_buffer_pool_size in MySQL Server.
The Buffer pool is essential for the InnoDB engine because InnoDB maintains the storage area for caching data and indexes in memory.
I have a rough figure like, if you have 3 GB of InnoDB data and indexes, you require at least 1 GB size of innodb_buffer_pool_size.
Below is a script to calculate the size for InnoDB buffer pool.
After executing above statement, You will get one RIBPS value. e.g. result in 2 RIBPS, so you require 2 GB size of the buffer pool.
You can change this parameter in the config file and restart your MySQL Service.
InnoDB reserves additional memory for buffers and control the structures, so that the total allocated space is approximately 10% greater than the specified size.

0 comments:

Post a Comment