Usage of Percona Toolkit in Production Environment

Dear Percona Team,
I manage a Percona Cluster (Multi-Master Nodes) running MySQL version 5.7.40. We are experiencing significant slowdowns when adding indexes, in addition to table locking. I’ve been researching Percona Toolkit, particularly the pt-online-schema-change tool, and find it very useful.

However, I noticed that the documentation mentions some potential risks:

“Percona Toolkit is mature, proven in the real world, and well tested, but all database tools can pose a risk to the system and the database server. Before using this tool, please test the tool on a non-production server.”

Given these risks, I would like to know if it’s safe to use the pt-online-schema-change tool in a production environment, considering the current performance challenges in our cluster.

Here are the key details of our setup:

  • Cluster Version: 57
  • MySQL Version: 5.7.40

Could you please provide guidance or best practices for using this tool in a live production system? Any advice on minimizing risks would also be greatly appreciated.

Thank you in advance for your help.

pt-online-schema-change is one of the best tools available for doing schema changes. It is specially built for that.

This is applicable for all the changes you do on your databases not only with pt-online-schema-change.
You need to test anything that you have to run on your production database

The only thing you need to be stay careful if you have triggers and foreign keys in your table. You should read and understand the document if this is the case and use proper parameters for running pt-online-schema-change. Otherwise it is very straight forward.

You can use --max-flow-ctl=0 as an additional option if you running Percona Xtradb cluster or Galera cluster.

You can check the documentation for pt-online-schema-change. for tuning it further.

1 Like