Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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