We are planing to test the performance of the new DB server. For that we have the below the plan:
get production sql queries
replay those sql queries against the different DB
I was planing to use pt-log-player to play the sql queries and use the pt-query-digest to analyze the result files which gets generated from pt-log-player after execution. So my questions are:
- how to get the production query in the first place. enabling slow log query is not an option due to performance reason (as our DB admin denied about that)
- Why
pt-log-playeris deprecated, was there any bug or whats the reason behind. - Or someone can suggest me a complete different toolset to do the perf test. Thanks.
tcpdump. I am able to capture the packets through tcpdump from the existing PROD DB but how will i reply those against the new PROD DB which i want to do the perf test? – Trying Jun 21 '16 at 19:26cat mysql.queries.sql | mysql -h new_db_name -u user_name -ppasswordBut of course this is going to be single threaded execution. You can split the files into multiple smaller ones and iterate over with putting the execution in the background:for f in $(ls mysql.queries.sql.*); do cat mysql.queries.sql | mysql -h new_db_name -u user_name -ppassword & ; done;. Or take a look at this script if you prefer python: https://github.com/charlesnagy/web-toolkit/blob/master/captest/wt-capacity-test.py You need to change it to mysql of course. – Károly Nagy Jun 22 '16 at 07:59