当前位置:Gxlcms >
数据库问题 >
mysql-5.7 Using Asynchronous I/O on Linux
mysql-5.7 Using Asynchronous I/O on Linux
时间:2021-07-01 10:21:17
帮助过:3人阅读
--------
FILE I
/O
--------
I
/O thread
0 state: waiting
for i
/o request (
insert buffer thread)
I/O thread
1 state: waiting
for i
/o request (
log thread)
I/O thread
2 state: waiting
for i
/o request (
read thread)
I/O thread
3 state: waiting
for i
/o request (
read thread)
I/O thread
4 state: waiting
for i
/o request (
read thread)
I/O thread
5 state: waiting
for i
/o request (
read thread)
I/O thread
6 state: waiting
for i
/o request (write thread)
I/O thread
7 state: waiting
for i
/o request (write thread)
I/O thread
8 state: waiting
for i
/o request (write thread)
I/O thread
9 state: waiting
for i
/o request (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
376 OS
file reads,
54 OS
file writes,
7 OS fsyncs
41.77 reads
/s,
21886 avg bytes
/read,
6.00 writes
/s,
0.78 fsyncs
/s
由上面的内容可以看出默认情况下innodb会有4个read-thread 和4个write-thread ,问题就出现在这里,如果业务繁重,那么
读写任务就会非常的多,而innodb只有八个读写线程,这样的话队列中的其它读写请求就没能得到及时的响应。
引入异步IO之后就变天啦,读写请求不再像之前那样先放入队列,等着后台的读写线程去执行任务;
----
mysql-5.7 Using Asynchronous I/O on Linux
标签:文件的 日志文件 写入 show nod aio -- 场景 mysq