How to change innodb_thread_concurrency in MySQL

I will give an example of changing innodb_thread_concurrency in MySQL.
Since InnoDB uses operating system threads to process user transactions, the innodb_thread_concurrency parameter allows you to limit them. By default in new MySQL versions the value is 0, which means that there is no limit on the number of simultaneously executed threads and this is correct for modern servers. If you want to limit, then when the limit is reached, the extra threads will wait a certain number of microseconds specified in the innodb_thread_sleep_delay parameter, and then try to get into the queue. Also in MySQL 5.6.3 and higher, the innodb_adaptive_max_sleep_delay parameter was added which allows you to specify the maximum number of microseconds for the innodb_thread_sleep_delay parameter and then InnoDB automatically adjusts innodb_thread_sleep_delay.

Continue reading “How to change innodb_thread_concurrency in MySQL”