[DRBD-user] how to measure the time of one file's synchronization to secondary node

Lars Ellenberg lars.ellenberg at linbit.com
Tue Sep 21 17:40:44 CEST 2010

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, Sep 21, 2010 at 09:30:06AM -0600, Mike Lovell wrote:
> Tomki wrote:
> >resource r0 {
> > protocol C;
> > startup { wfc-timeout 0; degr-wfc-timeout 120; }
> > disk { on-io-error detach; }
> >}
> >
> >If I copy a 1GB file to /mnt on primary node , how to measure the time
> >of this file's synchronization to secondary node
> >done completely.
> according to the config you posted, you are using protocol C on the
> drbd resource. the drbd.conf man pages says that with protocol C the
> "write IO is reported as completed, if it has reached both local and
> remote disk." in other words, when you write a file on the primary,
> drbd will not return the write operation as completed until drbd has
> written the blocks to the local disk as well as written it to the
> disk on the remote node. this makes it really easy to measure the
> time that it takes. just do `time cp /path/to/large/file
> /mnt/new/path/to/large/file`. the write operations in the cp wont
> complete until the data is on both disks.

Uhm... page cache...

rather do a "time cp $source $sink ; time sync",
otherwise you only benchmark your memory bandwidth
(assuming that the 1GiB file fits into your RAM).

: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
please don't Cc me, but send to list   --   I'm subscribed

More information about the drbd-user mailing list