<div class="gmail_extra">Try turning off disk-barrier and disk-flushes and see if that makes a difference.<br><br><div class="gmail_quote">2012/4/25 feng zheng <span dir="ltr">&lt;<a href="mailto:zf5984599@gmail.com" target="_blank">zf5984599@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">hi, dear all:<br>
<br>
When I use drbd, I found the write performance very slow, against<br>
testing without drbd module.<br>
<br>
1. the environment:<br>
-) CentOS 5.6<br>
-) 2.6.18 kernel<br>
-) drbd 8.4.1<br>
-) drbd.conf:<br>
resource r0<br>
{<br>
    protocol B;<br>
<br>
    net<br>
    {<br>
max-buffers  8000;<br>
max-epoch-size 8000;<br>
sndbuf-size 512K;<br>
    }<br>
<br>
    disk<br>
    {<br>
 al-extents 3389;<br>
    }<br>
<br>
<br>
    on OSS211<br>
    {<br>
        device /dev/drbd0;<br>
        disk /dev/sdb1;<br>
        address <a href="http://192.168.100.231:7788" target="_blank">192.168.100.231:7788</a>;<br>
        meta-disk internal;<br>
    }<br>
<br>
    on OSS213<br>
    {<br>
        device /dev/drbd0;<br>
        disk /dev/sde1;<br>
        address <a href="http://192.168.100.213:7788" target="_blank">192.168.100.213:7788</a>;<br>
        meta-disk internal;<br>
    }<br>
<br>
}<br>
<br>
<br>
2. Test scenario:<br>
*) without drbd module,<br>
dd to write 1G stream into one disk, which formatted to ext3:<br>
[para]# !echo<br>
echo 3 &gt; /proc/sys/vm/drop_caches<br>
[para]# !dd<br>
dd if=/dev/zero of=test1 bs=1M count=1000 conv=fdatasync<br>
1000+0 records in<br>
1000+0 records out<br>
1048576000 bytes (1.0 GB) copied, 10.9905 seconds, 95.4 MB/s<br>
<br>
*) with drbd module,<br>
dd 1G stream to the disk, which is ext3 too:<br>
[para]# cat /proc/drbd<br>
version: 8.4.1 (api:1/proto:86-100)<br>
GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by<br>
root@OSS213, 2012-04-16 21:38:36<br>
 0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate B r-----<br>
    ns:1260036 nr:0 dw:1260036 dr:297 al:330 bm:0 lo:0 pe:0 ua:0 ap:0<br>
ep:1 wo:b oos:0<br>
[para]#<br>
[para]# dd if=/dev/zero of=test1 bs=1M count=1000 conv=fdatasync<br>
1000+0 records in<br>
1000+0 records out<br>
1048576000 bytes (1.0 GB) copied, 26.7392 seconds, 39.2 MB/s<br>
[para]# cat /proc/drbd<br>
version: 8.4.1 (api:1/proto:86-100)<br>
GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by<br>
root@OSS213, 2012-04-16 21:38:36<br>
 0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate B r-----<br>
<br>
All the upper test writing disk are same. From the upper result, if i<br>
use DRBD to test, the performance<br>
is 39 MB/s; while if i do not use, the performance is about 95M/s.<br>
<br>
3. My question is:<br>
-) this write performance decays so large is normal or not?<br>
I had read the following from the DRBD website:<br>
&quot;15.1. Hardware considerations:<br>
....  A single, reasonably recent, SCSI or SAS disk will<br>
typically allow streaming writes of roughly 40MB/s to the single disk.&quot;<br>
But this is very slow.<br>
<br>
-)if this is not normal, how can i turn this? is the config file<br>
something not correct?<br>
<br>
thanks a lot<br>
BRs,<br>
feng<br>
</div></div>_______________________________________________<br>
drbd-user mailing list<br>
<a href="mailto:drbd-user@lists.linbit.com">drbd-user@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/drbd-user" target="_blank">http://lists.linbit.com/mailman/listinfo/drbd-user</a><br>
</blockquote></div><br></div>