[DRBD-user] MySQL-over-DRBD Performance

Art Age Software artagesw at gmail.com
Tue Dec 18 20:47:37 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 Dec 18, 2007 10:41 AM, Lars Ellenberg <lars.ellenberg at linbit.com> wrote:
> On Tue, Dec 18, 2007 at 07:13:05PM +0100, Lars Ellenberg wrote:
> > please do
> >   one-node# ping -w 10 -f -s 4100 replication-link-ip-of-other-node
> > and show me the output.
>
> also,
>
> 1)
>  drbdadm disconnect you-resource-name
>  drbd now StandAlone Primary/Unknown
>  dd if=/dev/zero bs=4096 count=10000 of=/some/file/on/your/drbd oflag=dsync
>
> 2)
>  drbdadm adjust all
>  wait for the resync
>  drbd now Connected Primary/Secondary
>  dd if=/dev/zero bs=4096 count=10000 of=/some/file/on/your/drbd oflag=dsync
>
> 3)
>  dd if=/dev/zero bs=4096 count=10000 of=/some/file/NOT/on/your/drbd oflag=dsync
>
> do each dd command several times,
> do this when nothing else happens on the box.
>
> the important part here is the "dsync" flag.
> if your dd does not know about that, upgrade.
>
> the dd bs=4096 count=10000 oflag=sync
> (many small requests, each single one of them synchronous by itself)
> is to give an idea for the average latency of one single write request,
>   * with drbd disconnected
>   * with drbd connected
>   * without drbd (should be as close as possible to the lower level
>     device of drbd, preferably on the same hardware)

OK, here are the results:

Test 1: DRBD Disconnected

[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/drbd/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 3.14315 seconds, 13.0 MB/s
[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/drbd/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 3.05737 seconds, 13.4 MB/s
[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/drbd/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 3.08115 seconds, 13.3 MB/s
[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/drbd/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 3.17052 seconds, 12.9 MB/s
[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/drbd/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 3.0727 seconds, 13.3 MB/s


Test 2: DRBD Connected

[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/drbd/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 11.8043 seconds, 3.5 MB/s
[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/drbd/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 11.9506 seconds, 3.4 MB/s
[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/drbd/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 12.2863 seconds, 3.3 MB/s
[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/drbd/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 11.203 seconds, 3.7 MB/s
[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/drbd/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 11.212 seconds, 3.7 MB/s


Test 3: Non-DRBD

[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 3.14307 seconds, 13.0 MB/s
[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 2.98458 seconds, 13.7 MB/s
[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 2.95751 seconds, 13.8 MB/s
[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 2.90936 seconds, 14.1 MB/s
[node1 ~]$ dd if=/dev/zero bs=4096 count=10000 of=/tmp/testfile oflag=dsync
10000+0 records in
10000+0 records out
40960000 bytes (41 MB) copied, 3.04481 seconds, 13.5 MB/s



More information about the drbd-user mailing list