首先查看了系统的信息,
innodb_thread_concurrency | 8
--------
FILE I/O
--------
I/O thread 0 (thread id: 18578) state:
waiting for completed aio requests (insert buffer thread)
I/O thread 1 (thread id: 18579) state:
waiting for completed aio requests (log thread)
I/O thread 2 (thread id: 18580) state:
waiting for completed aio requests (read thread)
I/O thread 3 (thread id: 18581) state:
waiting for completed aio requests (read thread)
I/O thread 4 (thread id: 18582) state:
waiting for completed aio requests (read thread)
I/O thread 5 (thread id: 18583) state:
waiting for completed aio requests (read thread)
I/O thread 6 (thread id: 18584) state:
waiting for completed aio requests (write thread)
I/O thread 7 (thread id: 18585) state:
waiting for completed aio requests (write thread)
I/O thread 8 (thread id: 18586) state:
waiting for completed aio requests (write thread)
I/O thread 9 (thread id: 18587) state:
waiting for completed aio requests (write thread)
用show engine innodb status出来的结果就有10 IO个线程,而innodb_thread_concurrency却为8。
这是为什么呢?原来这个innodb_thread_concurrency指的是mysql调用innodb的线程最大并发数,大家知道由于mysql特有的插件式存储引擎架构,先上mysql架构图:
所以上层要使用innodb存储引擎的时候,肯定是mysql开启线程去调用innodb存储引擎进行相关工作,所以这里的innodb_thread_concurrency指的就是innodb接受mysql线程调用的最大线程数,而不是在innodb内部工作的线程数。之前用show engine innodb status显示的线程就是innodb内部的线程。
OK,问题解决了,顺便还提一句,还有一个参数thread_concurrency
这个代表的什么呢?
手册上有解释:This variable is specific to Solaris systems,而且在mysql5.6.1中就被废弃了
没有评论:
发表评论