Not the answer you need?
Register and ask your own question!

Why MySQL only Use ONE THREAD for Query

tonysunxdtonysunxd EntrantCurrent User Role Beginner
Hi Gurus,

I have a question that puzzled me long time. I was using percona 5.6 as my MySQL database version. From the documents, I know that there are two variables: innodb_read_io_threads and innodb_write_io_threads can be used to make more pocessors to help on IO performance.

I have a server with 2 CPUs and each has 4 cores. I configured these two variables with value 4, and I used iotop to monitor the IO status. From my understanding, when I run a query, there should be 4 threads in iotop screen. When I run a DML statement, there will be 4 threads in iotop as well.

It is true when I run a DML statement. But it's ONLY ONE mysqld thread when I ran a query. It looked like this query only use one core, the other 3 cores was idle.

Can anyone please let me know how I can make the query use 4 processors, not only 1?

Many thanks,

Tony

Comments

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.