Not the answer you need?
Register and ask your own question!

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

omggsomggs EntrantCurrent User Role Beginner
I was wondering how 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.

Comments

  • martin.arrietamartin.arrieta Member Inactive User Role Beginner
    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
  • KoHeadKoHead Contributor Inactive User Role Beginner
    You can adjust the time of chunk with --chunk-time option
  • dhoomdhoom Entrant Current User Role Beginner
    Thanksssss
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.