Restricting speed of reading binlog from master by a slave

The terms master and slave have historically been used in replication, but the terms terms primary and replica are now preferred. The old terms are used throughout the documentation, and in MariaDB commands, although MariaDB 10.5 has begun the process of renaming. The documentation will follow over time. See MDEV-18777 to follow progress on this effort.

Restricting speed of reading binlog from master by a slave

When a slave starts after being stopped for some time, or a new slave starts that was created from a backup from some time back, a lot of old binlog events may need to be downloaded from the master. If this happens from many slaves simultaneously, it can put a lot of load on the master.

The option read_binlog_speed_limit can be used to reduce such load, by limiting the speed at which events are downloaded. The limit is given as maximum kilobytes per second to download on one slave connection.

With this option set, the replication I/O thread will limit the rate of download. Since the I/O thread is often much faster to download events than the SQL thread is at applying them, an appropriate value for read_binlog_speed_limit may reduce load spikes on the master without much limit in the speed of the replication slave.

The option read_binlog_speed_limit is available starting from MariaDB 10.2.3.

read_binlog_speed_limit

  • Description: Maximum speed(KB/s) to read binlog from master
  • Commandline: --read-binlog-speed-limit[=#]
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 0
  • Range: 0 to 4294967295
  • Introduced: MariaDB 10.2.3

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.