mysql主要后台线程介绍说明

 

线程名称说明
master thread主要负责将合并也脏缓存页刷到数据文件,执行purge操作,触发检查点,合并插入缓冲区等;
insert buffer thread主要负责插入缓冲区的合并操作;
read thread负责数据库读取操作,可以配置多个读线程;
write thread负责数据库的写操作,可以配置多个写线程;
log thread用于将重做日志文件刷新到logfile中;
purge threadmysql5.5之后用单独的purge thread 执行purge操作;
lock thread负责锁控制和死锁检测等;
错误监控线程主要负责错误监控和错误处理;


 

通过show engine innodb status 命令查看线程的状态;


=====================================
2019-09-06 10:37:06 0x7f18c3fbe700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 12 seconds
--------
FILE I/O
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (write thread)
I/O thread 7 state: waiting for completed aio requests (write thread)
I/O thread 8 state: waiting for completed aio requests (write thread)
I/O thread 9 state: waiting for completed aio requests (write thread)
Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] ,
 ibuf aio reads:, log i/o's:, sync i/o's:
Pending flushes (fsync) log: 0; buffer pool: 0
7220497 OS file reads, 1072100 OS file writes, 191589 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s

----------------------------
END OF INNODB MONITOR OUTPUT
============================
 |


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值