patternsqlMinor
MySQL performance impact of increasing innodb_buffer_pool_size
Viewed 0 times
impactinnodb_buffer_pool_sizemysqlincreasingperformance
Problem
I have two databases one of size 170 MB and second one is of 15 MB, both having INNODB tables and
My queries are responding well now i.e under mili seconds.
Is there any impact on performance if I set
innodb_buffer_pool_size is set to 8 MB.My queries are responding well now i.e under mili seconds.
Is there any impact on performance if I set
innodb_buffer_pool_size more than the default?Solution
If you want to size the innodb_buffer_pool_size bigger please run this:
This will give you the maximum amount of InnoDB Buffer Pool needed for your current data set.
Given the amount of data and index pages for your dataset, having 8MB Buffer Pool will just cause data and index pages accessed to rotate out and load new pages as needed. Setting it with the value based on that RIBPS query (RIBPS stands for Recommended InnoDB Buffer Pool Size), all of InnoDB will be accessed from RAM. Having the Buffer Pool too big would just wastes RAM.
Let's say that you ran this query and got the following:
Take that number and place it in /etc/my.cnf
and restart mysql.
I have discussed this before
Give it a Try !!!
SELECT CEILING(SUM(data_length+index_length)/POWER(1024,2)) RIBPS
FROM information_schema.tables WHERE engine='InnoDB';This will give you the maximum amount of InnoDB Buffer Pool needed for your current data set.
Given the amount of data and index pages for your dataset, having 8MB Buffer Pool will just cause data and index pages accessed to rotate out and load new pages as needed. Setting it with the value based on that RIBPS query (RIBPS stands for Recommended InnoDB Buffer Pool Size), all of InnoDB will be accessed from RAM. Having the Buffer Pool too big would just wastes RAM.
Let's say that you ran this query and got the following:
mysql> SELECT CEILING(SUM(data_length+index_length)/POWER(1024,2)) RIBPS
-> FROM information_schema.tables WHERE engine='InnoDB';
+-------+
| RIBPS |
+-------+
| 1493 |
+-------+Take that number and place it in /etc/my.cnf
[mysqld]
innodb_buffer_pool_size=1493Mand restart mysql.
I have discussed this before
Apr 14, 2011: What are the main differences between InnoDB and MyISAM?
Jan 11, 2012: MySQL said "InnoDB: Initializing buffer pool, size = 128.0M", does it mean it is using 128MB RAM?
Jun 13, 2012: What to set innodb_buffer_pool and why..?
Oct 22, 2012: How large should be mysql innodb_buffer_pool_size?
Give it a Try !!!
Code Snippets
SELECT CEILING(SUM(data_length+index_length)/POWER(1024,2)) RIBPS
FROM information_schema.tables WHERE engine='InnoDB';mysql> SELECT CEILING(SUM(data_length+index_length)/POWER(1024,2)) RIBPS
-> FROM information_schema.tables WHERE engine='InnoDB';
+-------+
| RIBPS |
+-------+
| 1493 |
+-------+[mysqld]
innodb_buffer_pool_size=1493MContext
StackExchange Database Administrators Q#39467, answer score: 8
Revisions (0)
No revisions yet.