checkpoint检查点,脏页回写

mysql> show engine innodb status\G;
LOG
---
Log sequence number 14963129               
Log flushed up to   14963129
Pages flushed up to 14963129
Last checkpoint at  14963120
0 pending log flushes, 0 pending chkp writes
10 log i/o's done, 0.08 log i/o's/second

位置:
①Log sequence number 14963129 日志已经生成到logbuffer的最新位置
②Log flushed up to 14963129 日志已经写到logfile的位置
③Pages flushed up to 14963129 脏页刷新到磁盘上的位置
④Last checkpoint at 14963120 共享表空间的日志记录点

这里写图片描述

后台写线程在某些情况下会阻塞前台线程
1、lru冷端没有足够干净块,前台线程会触发后台线程加快写入脏块,前台线程等待
加大写力度
innodb_lru_scan_depth
innodb_io_capacity
innodb_io_capacity_max
2、不能被覆盖的redolog数量过大
Log flushed up to - Last checkpoint at 在logfile中占得过长,logfile不能被循环覆盖,整个数据库被hang住
增加logfile的大小和组数
3、脏页达到阈值,监控脏页占的比例
增加后台写线程的数量
增加存储写能力(闪卡/bbu支持的写缓存raid卡/nv缓存raid卡)

猜你喜欢

转载自blog.csdn.net/qq_39570637/article/details/81434118
今日推荐