[DRBD-user] benchmark maximal sync throughput / minimal sync time

Lars Ellenberg Lars.Ellenberg at linbit.com
Sun Mar 21 16:02:07 CET 2004

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

/ 2004-03-21 04:25:51 -0700
\ Jim Richard:
> just a question about whether my SyncAll time is good or should I be 
> adjusting some parameters.
> 2 machines, 5GB SCSI/160 devices on each, connected by a crossover 
> cable, both with GigaBit cards, one machine is a P4 2.8 other is a 
> Athlon 1700+. SyncAll is happening at about 18000 k/sec, takes about 5 
> to 6 minutes. no other activity on the machines or the wire.
> Is that a decent time or should I be adjusting something? Not that I 
> think that's slow, I just want to make sure I'm getting the most out of 
> the link.

I attach a little scriptlet. You can try to use it to benchmark
the throughput of your disks and network link without DRBD.

== What does it do? ==

  It does the equivalent of a full synchronization (SyncAll)
  using dd and [rs]sh, and times it. Basically:

    time { dd if=/local/device } |
    time rsh peer "dd of=/remote/device; sync"

  only a little bit more involved...
  And it tries to calculate the throughput you get from this.

== USAGE ==

  time-dd-net-sync.sh SOURCE_DEV TARGET_HOST TARGET_DEV \
  			[RSH:=ssh] [SIZE(MB):=FULL]
  Obviously, if you want to specify the SIZE, you have to specify 
  explicitly which kind of RSH to use first.
  Note that using ssh will have huge CPU overhead, so better use
  rsh, if available, for this test.

  SOURCE_DEV can also be a plain file, or /dev/zero ...
  TARGET_DEV can also be a plain file, or /dev/null ...
  So you can even test the influence of the different parts of
  your setup with this.


  time-dd-net-sync.sh /dev/scratch/D0-1 \ /dev/scratch/D0-1 rsh 50
  R 0:00.14 0.00 0.00 sync
  R 0:00.18 0.00 0.00 sync
  >> 12800+0 Records in
  >> 12800+0 Records out
  L 0:01.06 0.02 0.05 dd bs=4k count=12800 if=/dev/scratch/D0-1
  L 0:01.07 0.02 0.06 LOCAL TOTAL
  >> 12800+0 records in
  >> 12800+0 records out
  R 0:02.76 0.02 0.49 dd bs=4k count=12800 of=/dev/scratch/D0-1
  R 0:00.17 0.00 0.00 sync
  R 0:00.07 0.00 0.00 sync
  R 0:03.39 0.00 0.01 REMOTE TOTAL

     Transfered 50 MB in 4 seconds.
     Looks like you can transfer
     12 MB/sec
     with synchronous dd over your net using
     /dev/scratch/D0-1 >> rsh >>

For a real life test, you obviously want to transfer more than 50M


> I can't seem to be able to increase MTU on one of the cards 
> beyond 1500, do only certain cards support jumbo packets?

Ok, sometimes the card itself would support it, but the driver does not (yet).

	Lars Ellenberg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: time-dd-net-sync.sh
Type: application/x-sh
Size: 2161 bytes
Desc: time-dd-net-sync.sh
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20040321/fdb25499/attachment.sh>

More information about the drbd-user mailing list