1

We have two MySQL servers set up with simple master-slave replication. We currently use all MyISAM tables, but may move to InnoDB in the future. Our largest tables are more then 2GB.

I would like to use the mk-table-checksum tools to run checksums on the tables, so that I can be sure that replication is working correctly.

The book High Performance MySQL and this mk-table-checksum tutorial both recommend using --sleep and --chunk-size to help avoid database blocking.

My question is in regards to the 'blocking':

  1. What sort of blocking might happen here? Is this simply referring to read locks on a table?
  2. If I don't specify --chunk-size, some of these checksums take 4-5 minutes. Will the table be locked from writes at this time?
2

It just refers to read/write locks on tables. Read locks if you're using the default checksum implementation built into MySQL; shared read locks if you're using --replicate, which does INSERT..SELECT statements.

  • And according to the documentation, mk-table-checksum will only INSERT data into the table specified by --replicate. – Stefan Lasiewski Aug 31 '10 at 17:29
  • Thanks @Baron. Nice to have an answer from the person who wrote the tools! – Stefan Lasiewski Aug 31 '10 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.