A
A
AntonioK2011-09-22 10:23:44
MySQL
AntonioK, 2011-09-22 10:23:44

Choosing the right value for innodb_thread_concurrency in MySQL wisely

I'm setting up a MySQL server in production with a high load. I got to the choice of the innodb_thread_concurrency value (8 by default, it is obvious that it is beneficial to increase it on powerful hardware).

The question is simple: in the documentation we read that

A recommended < innodb_thread_concurrency > value is 2 times the number of CPUs plus the number of disks.


I have 2 quad-core Xeons on my server with hyper trading enabled. What to consider the CPU in this context - directly processors (doubtful), cores (cores), which I get 8, or threads (threads), which I have 16 (I tend to this version)?

With the number of disks, by the way, it is also unclear - if there are 2 disks in the system, on one OS, and on the second - /var/db/mysql, should we consider that disk 1 in this context? And if everything is spinning on RAID 0 + 1 on, say, 8 physical disks?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Grigory Peretyaka, 2011-09-22
@AntonioK

innodb_thread_concurrency is the maximum number of threads.
On such processors, I have seen that this value is both 50 and 100.
If you have a heavy load on the processor, then you can do more. But if everything rests on the hard drive, which is very likely, then it's better not to overdo it. In general, try to observe the loading of the hard drive and the processor, and if they are not loaded, try to slowly increase innodb_thread_concurrency.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question