Mysql – Setting innodb_buffer_pool_size in for Mysql

innodbMySQLoptimization

We have a dedicated DB box with with 8 GB of RAM and running Redhat linux 64 bit OS. Our MySQL Data + Index size almost 7.8 GB. About setting innodb_buffer_pool_size, I have read 2 suggestions

  • Set it to 80% of RAM available on a dedicated DB server.
  • Set at-least 10% above the size of Data + Indexes.

We cannot satisfy the second condition in my case. So will it have negative effect on Database performance?

Will having innodb_buffer_pool_size of like 6GB affect the performance?

Best Answer

I think 80% is a little bit too much, I suggest 60%. Otherwise you'll risk swapping.

If you're data and indexes do not fit into ram (innodb_buffer_pool_size) you'll experience more disk reads. Which of course is slower than reading from RAM, especially when you have slow disks.

Monitoring disks (IOPS) can be done using iostat or pt-diskstats.