Announcement

Announcement Module
Collapse
No announcement yet.

pt-table-checksum - how many rows to chunk at a time?

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • pt-table-checksum - how many rows to chunk at a time?

    I was wondering how pt-table-checksum decides how many rows to chunk at a time for a table with primary key. I see that the first chunk is always of size 1000 rows. But the subsequent ones vary depending on the table. Can someone explain how these chunk sizes are decided?

    Thanks.

  • #2
    Hi,

    The idea is that calculation of each chunk takes 0.5 second. It will start from 1000 rows, if this query takes more than 0.5 seconds, it next chunk will be with less rows, if the chunk takes less than 0.5 second, the next chunk it will take more rows and so on.

    This is one of the safeguards that pt-table-checksum have and you can always modify this values (--chunk-time, --chunk-size, etc), also it will monitor the server load, replication lag, etc.

    Please take a look to the documentation for more information. http://www.percona.com/doc/percona-toolkit/2.1/pt-table-chec ksum.html

    Martin
    @martinarrietac

    Comment


    • #3
      You can adjust the time of chunk with --chunk-time option

      Comment

      Working...
      X