Linux CPU core (number of cores) for running MySQL services)

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.