I recently used mysqlslap to test MySQL performance. However, the measured TPS and QPS benchmark data are different from the authoritative online test data in terms of trend. This made OneCoder very skeptical about the accuracy of the test data. In the process of locating the problem, execute the mysqlslap test on a machine independent from MySQLServer, and the measured data trend is normal. That is
I recently used mysqlslap to test MySQL performance. However, the measured TPS and QPS benchmark data are different from the authoritative online test data in terms of trend. This made OneCoder very skeptical about the accuracy of the test data. In the process of locating the problem, execute the mysqlslap test on a machine independent from the MySQL Server. The measured data trend is normal. That is
I recently used mysqlslap to test MySQL performance. However, the measured TPS and QPS benchmark data are different from the online "authoritative" test data. This made OneCoder very skeptical about the accuracy of the test data.
In the process of locating the problem, execute the mysqlslap test on a machine independent from the MySQL Server. The measured data trend is normal. That is, TPS and QPS increase with the increase of concurrency (within a certain range. This made me suspect that my previous tests on the same Server may compete for CPU resources between mysqlslap and MySQL Server.
In a MySQL test report, we can see the following:
In addition, the tested machine has 16 cores, of which 12 cores run mysqld, And the other 4 cores run sysbench.
Search for the specified method on the Internet immediately. Taskset command in Linux
Taskset-cp cpu No. mysqld-pid
You can specify the cpu Core Used by the mysqld service. For example:
taskset -cp 0-47 12345
When executing mysqlslap, you only need
taskset -c 48-63 mysqlslap xxxxxx
Specify the cpu core used. Prepare to allocate 48 cores to MySQL Server and 16 cores to mysqlslap. Test the result.
Original article address: Linux specifies the CPU core (number of cores) for running MySQL services. Thanks to the original author for sharing.