buffer相关参数:
innodb_buffer_pool_size innodb_buffer 大小
innodb_buffer_pool_instances innodb_buffer instance 个数
innodb_old_blocks_pct LRU端mid点位置
innodb_old_blocks_time LRU在Old端保留的时间
innodb_io_capacity 刷新到磁盘页的数量
innodb_max_dirty_pages_pct 脏页占buffer最大比例
innodb_purge_batch_size full purge回收undo页的数量
innodb_adaptive_flushing 自适应刷新,该参数影响每秒刷新脏页的数量(如果脏页量大于innodb_max_dirty_pages_pct,则会根据redolog产生的速度决定最合适的刷新脏页数量)
innodb_change_buffering DML缓存(inserts、deletes、purges、changes、all、none)
innodb_change_buffer_max_size DML缓存占innodb缓存比例
--查看Buffer内free_buffer和总页数
SELECT POOL_ID,POOL_SIZE,FREE_BUFFERS,DATABASE_PAGES
FROM INNODB_BUFFER_POOL_STATS;--查看page made young和not young页情况
--(page made young为LRU由OLD端移动到New端的数据页数;not young为LRU由于innodb_old_blocks_time参数没有从Old移动到New端的数据页数)
SELECT POOL_ID,HIT_RATE,PAGES_MADE_YOUNG,PAGES_NOT_MADE_YOUNG
FROM INNODB_BUFFER_POOL_STATS;
--查看unzip_LRU列表页情况(unzip_LRU管理非16K页)
SELECT TABLE_NAME,SPACE,PAGE_NUMBER,COMPRESSED_SIZE
FROM INNODB_BUFFER_PAGE_LRU
WHERE COMPRESSED_SIZE <> 0;--查看脏数据页(table_name为NULL表示属于系统表空间)
SELECT table_name,space,page_number,page_type
FROM INNODB_BUFFER_PAGE_LRU
WHERE OLDEST_MODIFICATION > 0;