To see the Buffer Pool size in GB run this:

To see the Buffer Pool size in GB run this:

SELECT FORMAT(BufferPoolPages*PageSize/POWER(1024,3),2) BufferPoolDataGB FROM(SELECT variable_value BufferPoolPages FROM information_schema.global_status
WHERE variable_name ='Innodb_buffer_pool_pages_total') A,(SELECT variable_value PageSize FROM information_schema.global_status
WHERE variable_name ='Innodb_page_size') B;

Database pages 360515 This is the number of pages with data inside the Buffer Pool

To see the amount of data in the Buffer Pool size in GB run this:

SELECT FORMAT(BufferPoolPages*PageSize/POWER(1024,3),2) BufferPoolDataGB FROM(SELECT variable_value BufferPoolPages FROM information_schema.global_status
WHERE variable_name ='Innodb_buffer_pool_pages_data') A,(SELECT variable_value PageSize FROM information_schema.global_status
WHERE variable_name ='Innodb_page_size') B;

To see the percentage of the Buffer Pool in use, run this:

SELECT CONCAT(FORMAT(DataPages*100.0/TotalPages,2),' %') BufferPoolDataPercentage FROM(SELECT variable_value DataPages FROM information_schema.global_status
WHERE variable_name ='Innodb_buffer_pool_pages_data') A,(SELECT variable_value TotalPages FROM information_schema.global_status
WHERE variable_name ='Innodb_buffer_pool_pages_total') B;

Modified db pages 300 This is the number of pages in the Buffer Pool that have to be written back to the database. They are also referred to as dirty pages.

To see the Space Taken Up by Dirty Pages, run this:

SELECT FORMAT(DirtyPages*PageSize/POWER(1024,3),2) BufferPoolDirtyGB FROM(SELECT variable_value DirtyPages FROM information_schema.global_status
WHERE variable_name ='Innodb_buffer_pool_pages_dirty') A,(SELECT variable_value PageSize FROM information_schema.global_status
WHERE variable_name ='Innodb_page_size') B;

To see the Percentage of Dirty Pages, run this:

SELECT CONCAT(FORMAT(DirtyPages*100.0/TotalPages,2),' %') BufferPoolDirtyPercentage FROM(SELECT variable_value DirtyPages FROM information_schema.global_status
WHERE variable_name ='Innodb_buffer_pool_pages_dirty') A,(SELECT variable_value TotalPages FROM information_schema.global_status
WHERE variable_name ='Innodb_buffer_pool_pages_total') B;

As for the other things in the display, run this:

SHOW GLOBAL STATUS LIKE'Innodb_buffer_pool%';

猜你喜欢

转载自mailx8.iteye.com/blog/2335717