How to set the innodb_buffer_pool_size size in the mysql parameter
This article mainly shows you "how to set the innodb_buffer_pool_size size in the mysql parameters", which is easy to understand and clear. I hope it can help you solve your doubts. Let me lead you to study and learn how to set the innodb_buffer_pool_size size in the mysql parameters.
Mysql > show global variables like 'innodb_buffer_pool_size'
+-+ +
| | Variable_name | Value |
+-+ +
| | innodb_buffer_pool_size | 134217728 | |
+-+ +
1 row in set (0.00 sec)
So how do you set the size of this parameter? First, check the runtime buffer pool-related data metrics:
Mysql > show global status like 'Innodb_buffer_pool_pages_data'
+-+ +
| | Variable_name | Value |
+-+ +
| | Innodb_buffer_pool_pages_data | 314 | |
+-+ +
1 row in set (0.00 sec)
Mysql > show global status like 'Innodb_buffer_pool_pages_total'
+-+ +
| | Variable_name | Value |
+-+ +
| | Innodb_buffer_pool_pages_total | 8191 | |
+-+ +
1 row in set (0.00 sec)
Mysql > show global status like 'Innodb_page_size'
+-+ +
| | Variable_name | Value |
+-+ +
| | Innodb_page_size | 16384 | |
+-+ +
1 row in set (0.00 sec)
The meanings of the above three indicators are as follows:
Innodb_buffer_pool_pages_data
The number of pages in the InnoDB buffer pool containing data. The number includes both dirty and
Clean pages.
Innodb_buffer_pool_pages_total
The total size of the InnoDB buffer pool, in pages.
Innodb_page_size
InnoDB page size (default 16KB). Many values are counted in pages; the page size enables them to be
Easily converted to bytes
Calculate Innodb_buffer_pool_pages_data/Innodb_buffer_pool_pages_total*100%
Increase innodb_buffer_pool_size when the result is > 95%, and 75% of physical memory is recommended.
Reduce innodb_buffer_pool_size when the result is less than 95%
Recommended setting size is: Innodb_buffer_pool_pages_data* Innodb_page_size * 1.05 / (1024 / 1024 / 1024)
Commands such as: SET GLOBAL innodb_buffer_pool_size= 32423423: unit kb
The above is all the contents of the article "how to set the innodb_buffer_pool_size size in the mysql parameters". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!