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':
- What sort of blocking might happen here? Is this simply referring to read locks on a table?
- 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?
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.