[DRBD-user] is drbd synchronization non-blocking (or: what "rate" really means)?

Lars Ellenberg lars.ellenberg at linbit.com
Tue Dec 18 19:23:12 CET 2007

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

On Tue, Dec 18, 2007 at 04:35:21PM +0100, Tomasz Chmielewski wrote:
> With RAID-1, a program which writes will generally write with a speed of 
> the slowest device in the array (it is apparent when one device is 
> local, and the second is available remotely via iSCSI).
> In Linux RAID-1 this can be mitigated a bit by setting --write-behind 
> for a remote/slow device: with this, bursts of writes will find its way 
> to a local device and a program won't have to wait until everything hits 
> the remote device as well.
> Long term, of course, write speed is still limited to the speed of the 
> slowest device.
> Is something similar possible with drbd?

we have the protocol setting,
try 'A'.
but the amount of data "buffered" is basically your tcp-sendbuffer plus
in-flight-io (counting everything on the wire and on the way to the
remote disk).

> The fine drbd.conf manual explains "rate" as:
>    To ensure smooth operation of the application on top of DRBD, it is
>    possible to limit the bandwidth which may be used by background
>    synchronizations. The default is 250 KB/sec
> So, what happens if I want to write 1 GB with and rate is set to 250 kB/s:
>   dd if=/dev/zero of=/dev/drbd1
> ?
> 1. dd will write the whole 1 GB with an average ~250 kB/s speed
> 2. dd will write as fast as possible to the primary device, and will 
> finish with an average speed of 20 MB/s (local/primary HDD limit).
> The secondary device will not be synchronized for several minutes, until 
> all data reach it with ~250 kB/s speed.

_syncer_ is the "reconstruction" of a previously degraded drbd.
this is what is throttled by the syncer rate configuration.

_application_ io (and normal _replication_) does not care for that
setting at all, and is affected by that setting only in so far as it has
to compete for bandwidth with a parallel running syncer. which is why
you should throttle the syncer to something below your available

: Lars Ellenberg                           http://www.linbit.com :
: DRBD/HA support and consulting             sales at linbit.com :
: LINBIT Information Technologies GmbH      Tel +43-1-8178292-0  :
: Vivenotgasse 48, A-1120 Vienna/Europe     Fax +43-1-8178292-82 :
please use the "List-Reply" function of your email client.

More information about the drbd-user mailing list