MySQL has been optimized recently. Many of them have added thread_concurrency to the configuration file. Most people provide the following description:
"SettingsThread_concurrencyThe correct value has a great impact on MySQL performance. When multiple CPUs (or multiple cores) are usedThread_concurrencyMySQL cannot make full use of multiple CPUs (or multiple cores), and only one CPU (or core) can work at the same time.
Thread_concurrencySet2 times the number of CPU Cores. For example, if you have a dual-core CPUThread_concurrencyIt should be 4; 2 dual-core CPUs,Thread_concurrencyThe value should be 8 ."
The specific modification method is as follows:
[Mysqld]
Thread_concurrency = 8
As you may not know, thread_concurrency can be used only in specific scenarios. Refer to the MySQL manual:
This variable is for the Solaris system. If this variable is set, mysqld will call thr_setconcurrency (). This function allows the application to provide the expected number of threads to the thread system running at the same time.