Before tuning, Innodb_buffer_pool_size is set to default value: 8M
mysql> show status like 'Innodb_buffer_pool_%';
+-----------------------------------+-----------+
| Variable_name | Value |
+-----------------------------------+-----------+
| Innodb_buffer_pool_pages_data | 511 |
| Innodb_buffer_pool_pages_dirty | 0 |
| Innodb_buffer_pool_pages_flushed | 2542331 |
| Innodb_buffer_pool_pages_free | 0 |
| Innodb_buffer_pool_pages_misc | 1 |
| Innodb_buffer_pool_pages_total | 512 |
| Innodb_buffer_pool_read_ahead_rnd | 4777 |
| Innodb_buffer_pool_read_ahead_seq | 7022 |
| Innodb_buffer_pool_read_requests | 115968607 |
| Innodb_buffer_pool_reads | 5413710 |
| Innodb_buffer_pool_wait_free | 0 |
| Innodb_buffer_pool_write_requests | 43308713 |
+-----------------------------------+-----------+
Innodb_buffer_pool_pages_free is the number of unused data pages.
Innodb_buffer_pool_pages_total is the total number of pages.
Innodb_buffer_pool_pages_data is the total number of used data pages
For current settings, Innodb_buffer_pool_pages_free / Innodb_buffer_pool_pages_Total = 0, that indicates Innodb_buffer_pool_size should have a larger value. After set Innodb_buffer_pool_size t0 500M, try again
mysql> flush status;
wait for a whole to let Mysql process some SQL actions
mysql> show status like 'Innodb_buffer_pool_%';
+-----------------------------------+--------+
| Variable_name | Value |
+-----------------------------------+--------+
| Innodb_buffer_pool_pages_data | 4269 |
| Innodb_buffer_pool_pages_dirty | 0 |
| Innodb_buffer_pool_pages_flushed | 3391 |
| Innodb_buffer_pool_pages_free | 28498 |
| Innodb_buffer_pool_pages_misc | 1 |
| Innodb_buffer_pool_pages_total | 32768 |
| Innodb_buffer_pool_read_ahead_rnd | 1 |
| Innodb_buffer_pool_read_ahead_seq | 0 |
| Innodb_buffer_pool_read_requests | 269789 |
| Innodb_buffer_pool_reads | 4177 |
| Innodb_buffer_pool_wait_free | 0 |
| Innodb_buffer_pool_write_requests | 105595 |
+-----------------------------------+--------+
Now, Innodb_buffer_pool_pages_free / Innodb_buffer_pool_pages_Total = 86%. It indicates the buffer pool has been over allocated, we should decrease it. After doing more testing, the size should be exactly match your current usage.
No comments:
Post a Comment