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

replication performance binlog_cache_size and binlog_stmt_cache_size

KryKry Current User Role Contributor

Hey.

It is not entirely clear how to configure two variables to improve replication performance.


binlog_cache_size and binlog_stmt_cache_size


The description says that the Binlog_stmt_cache_use and Binlog_stmt_cache_disk_use state variables can be useful for adjusting the size for setting binlog_stmt_cache_size, 


The description says that the Binlog_cache_use and Binlog_cache_disk_use state variables can be useful for adjusting the size for setting binlog_cache_size , 


There is no understanding .

But how exactly to tune


Maybe like this:

binlog_cache_size = Binlog_cache_use + Binlog_cache_disk_use

binlog_stmt_cache_size = Binlog_stmt_cache_use + Binlog_stmt_cache_disk_use


or:

binlog_cache_size = Binlog_cache_use 

binlog_stmt_cache_size = Binlog_stmt_cache_use


or:

binlog_cache_size = Binlog_cache_disk_use

binlog_stmt_cache_size = Binlog_stmt_cache_disk_use


thanks for the help.

Tagged:

Answers

  • igroeneigroene Percona Staff Role

    Hi Kry, the way to tune those variables is to check every few min

    SHOW GLOBAL STATUS LIKE 'Binlog_cache_disk_use' and/or

    SHOW GLOBAL STATUS LIKE 'Binlog_stmt_cache_disk_use'

    if you see that is increasing a lot then might be worth increasing the caches.

    However I encourage you to first look at other options like enabling parallel replication, or relaxing consistency settings to improve the replication speed.

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.