Configuring the rate of synchronization

Normally, one tries to ensure that background synchronization (which makes the data on the synchronization target temporarily inconsistent) completes as quickly as possible. However, it is also necessary to keep background synchronization from hogging all bandwidth otherwise available for foreground replication, which would be detrimental to application performance. Thus, you must configure the sychronization bandwidth to match your hardware — which you may do in a permanent fashion or on-the-fly.


It does not make sense to set a synchronization rate that is higher than the maximum write throughput on your secondary node. You must not expect your secondary node to miraculously be able to write faster than its I/O subsystem allows, just because it happens to be the target of an ongoing device synchronization.

Likewise, and for the same reasons, it does not make sense to set a synchronization rate that is higher than the bandwidth available on the replication network.

Permanent syncer rate configuration

The maximum bandwidth a resource uses for background re-synchronization is permanently configured using the rate option for a resource. This must be included in the resource configuration's syncer section in /etc/drbd.conf:

resource resource
  syncer {
    rate 40M;

Note that the rate setting is given in bytes, not bits per second.


A good rule of thumb for this value is to use about 30% of the available replication bandwidth. Thus, if you had an I/O subsystem capable of sustaining write throughput of 180MB/s, and a Gigabit Ethernet network capable of sustaining 110 MB/s network throughput (the network being the bottleneck), you would calculate:

Equation 6.1. Syncer rate example, 110MB/s effective available bandwidth

Thus, the recommended value for the rate option would be 33M.

By contrast, if you had an I/O subsystem with a maximum throughput of 80MB/s and a Gigabit Ethernet connection (the I/O subsystem being the bottleneck), you would calculate:

Equation 6.2. Syncer rate example, 80MB/s effective available bandwidth

In this case, the recommended value for the rate option would be 24M.

Temporary syncer rate configuration

It is sometimes desirable to temporarily adjust the syncer rate. For example, you might want to speed up background re-synchronization after having performed scheduled maintenance on one of your cluster nodes. Or, you might want to throttle background re-synchronization if it happens to occur at a time when your application is extremely busy with write operations, and you want to make sure that a large portion of the existing bandwidth is available to replication.

For example, in order to make most bandwidth of a Gigabit Ethernet link available to re-synchronization, issue the following command:

drbdsetup /dev/drbdnum syncer -r 110M

As always, replace num with the device minor number of your DRBD device. You need to issue this command on only one of your nodes.

To revert this temporary setting and re-enable the syncer rate set in /etc/drbd.conf, issue this command:

drbdadm adjust resource