innodb_buffer_pool_size

This is the most important tuning parameter that decides how much memory the InnoDB storage engine can use to cache data and indexes in memory. Setting it too low can degrade the performance of the MySQL server, and setting it too high can increase the memory consumption of MySQL process. The best thing about MySQL 8 is that innodb_buffer_pool_size is dynamic, meaning you can vary innodb_buffer_pool_size without restarting the server.

Here is a simple guide on how to tune it:

  1. Find out the size of your dataset. Do not set the value of innodb_buffer_pool_size higher than that of your dataset. Suppose you have a 12 GB RAM machine and your dataset is 3 GB; then you can set innodb_buffer_pool_size to 3 GB. If you expect ...

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.