In this post, I am providing a script to determine the size of innodb_buffer_pool_size in MySQL Server.
The Buffer pool is very important for the InnoDB engine because InnoDB maintains this storage area for caching data and indexes in memory.
I have one 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 one script to calculate require size for InnoDB buffer pool.
CEILING(Total_InnoDB_Bytes*1.6/POWER(1024,3)) AS RIBPS
SELECT SUM(data_length+index_length) Total_InnoDB_Bytes
FROM information_schema.tables WHERE engine='InnoDB'
) AS T;
After executing above statement, You will get one RIBPS value. e.g. result 2 RIBPS so you require 2 GB size of the buffer pool.
You can change this parameter in mysql in config file and restart your MySQL Service.
InnoDB reserves additional memory for buffers and control structures, so that the total allocated space is approximately 10% greater than the specified size.
Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.
If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.
I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.