[DRBD-user] Why is write performance so low?

Holger Kiehl Holger.Kiehl at dwd.de
Fri May 8 20:10:55 CEST 2009

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


On Thu, 7 May 2009, Brian R. Hellman wrote:

>
> Holger Kiehl wrote:
>> On Thu, 7 May 2009, Lars Ellenberg wrote:
>>
>>> On Thu, May 07, 2009 at 08:13:55PM +0000, Holger Kiehl wrote:
>>>>> local: 160 MB/s
>>>>> drbd disconnected: 70 MB/s
>>>>> AL-transaction latency appears to be:  32142 micro seconds
>>>>> you may want to verify this using e.g.
>>>>> dd if=/dev/zero of=ll_dev bs=512 count=1000 oflag=direct
>>>>>
>>>>> there.  now, how long does a synchonous single sector write take on you
>>>>> lower level device?
>>>>>
>>>> dd if=/dev/zero of=/dev/md4 bs=512 count=1000 oflag=direct
>>>> 1000+0 records in
>>>> 1000+0 records out
>>>> 512000 bytes (512 kB) copied, 3.38987 s, 151 kB/s
>>> right. though, your meta data is "internal",
>>> it is at the very end of the device,
>>> so all the disks in the md4 raid have to seek to the very end,
>>> possibly adjusting rotation speed, do that single sector write,
>>> then seek back (again possibly adjusting rotational speed),
>>> then write the next 4MB, seek back to the end, do the next transaction,
>>> seek to the front again.
>>>
>>> just for the fun of it, and to rule it out as possible cause,
>>> as an experiment, you could place DRBD meta data on a ram disk...
>>>
>> I will try this tommorrow and report what I get. Is there some documentation
>> on how to do this? How do I get the size of DRBD meta data?
>
> The formula for calculating the meta-data can be found at the link
> below, I would assume just use external meta-data, which can also be
> found in the guide below :)
>
> http://www.drbd.org/users-guide/ch-internals.html#s-meta-data-size
>
Thanks! With DRBD metadata on a ramdisk I get up to 120 MB/s when the
secondary is disabled. When I enable the secondary the best I get is
70 MB/s.

Is there maybe some bad interacion with DRBD and MD? Where does MD keep
its meta data? Would hardware raid give better performance with DRBD?

Holger



More information about the drbd-user mailing list