Announcing Percona Playback 0.5

Percona is glad to announce the release of Percona Playback 0.5 on November 26th, 2012. Downloads are available from our download site and Percona Software Repositories.

Percona Playback is a tool for replaying the load of one database server to another. Currently it can read queries from MySQL query-log and tcpdump files and run them on other MySQL server. With Percona Playback you can measure how a server or database upgrade, change in my.cnf or schema change can affect the overall performance of your database server.

This release should be considered Alpha quality.

New features:

  • Reports have been extended and now return the list of queries with a response time longer than the ones run on the original. Additional statistics, like the query types (SELECT, UPDATE,…) with the proportion off faster and slower statement for each categories, has been added as well.
  • Percona Playback now supports reading the slow query log from standard input (stdin) instead of log file.
  • For this release binary packages were prepared, full list is available in our documentation.

Bugs fixed:

  • Multi-line queries in the slow query log didn’t work correctly. Bug fixed #1035217 (Stewart Smith).
  • Raw tcpdump format wasn’t documented. Bug fixed #1034527 (Hrvoje Matijakovic).

Replaying the load with Percona Playback and tcpdump

Miguel already showed in his post how to use Percona Playback with the query_log plugin. Following example shows how to capture traffic with tcpdump and create a dump file that will be later used with Percona Playback.

On the production server we start the tcpdump with the -w option to collect packets into the raw tcpdump file:

After we collect some amount of traffic we can stop the tcpdump and use the dump file to replay the load on the test server. Warning: All the queries will be run with Percona Playback, not just the SELECT but the UPDATE,DELETE and INSERT ones as well. So be sure not to run this on production database unless you don’t need the data anymore.

This example uses accurate tcpdump-mode, which means Percona Playback will preserve query execution times and it will pause between queries to playback the same load that was recorded on production with the same accuracy.
After the dump file has been replayed on the server, Percona Playback will show the playback statistics in the report like:

We can use this information to decide if the test server needs further tuning or how it will be able to sustain production load.

If you encounter any bugs, please report them to our bug tracking system.

Share this post