<div dir="ltr">Hi Digimer,<div><br></div><div>Following is my qperf test between 2 nodes. TCP_BW test is good enough but something weird on UDP_BW test. What do you think? <a href="http://192.168.107.0/24">192.168.107.0/24</a> is on eth0 and <a href="http://10.10.130.0/24">10.10.130.0/24</a> is on eth1. Currently DRBD using eth1.</div><div><br></div><div><div>[root@db-2 ~]# qperf -t 60 --use_bits_per_sec 192.168.107.13 tcp_bw</div><div>tcp_bw:</div><div>    bw  =  8.81 Gb/sec</div><div><div><div>[root@db-2 ~]# qperf -t 60 --use_bits_per_sec 192.168.107.13 udp_bw</div><div>udp_bw:</div><div>    send_bw  =  13.6 Gb/sec</div><div>    recv_bw  =  5.82 Gb/sec</div></div></div><div>[root@db-2 ~]# qperf -t 60 --use_bits_per_sec 10.10.130.9 tcp_bw<br></div><div>tcp_bw:</div><div>    bw  =  8.47 Gb/sec</div><div>[root@db-2 ~]# qperf -t 60 --use_bits_per_sec 10.10.130.9 udp_bw</div><div>udp_bw:</div><div>    send_bw  =  13.2 Gb/sec</div><div>    recv_bw  =  79.6 Mb/sec</div><div><br></div></div><div>Best regards,</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 7, 2017 at 2:47 PM, Digimer <span dir="ltr">&lt;<a href="mailto:lists@alteeve.ca" target="_blank">lists@alteeve.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 06/02/17 02:08 PM, Lazuardi Nasution wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;m new with DRBD. I&#39;m trying to setup dual primary nodes (VMs with<br>
&gt; virtio-net of bonded of dual 10GbE links) with following resource config.<br>
&gt;<br>
&gt;     resource db {<br>
&gt;         on db-1 {<br>
&gt;             volume 0 {<br>
&gt;                 device       /dev/drbd0 minor 0;<br>
&gt;                 disk         /dev/vdc1;<br>
&gt;                 meta-disk    internal;<br>
&gt;             }<br>
&gt;             address          ipv4 <a href="http://10.10.130.9:7788" rel="noreferrer" target="_blank">10.10.130.9:7788</a><br>
</span>&gt;     &lt;<a href="http://10.10.130.9:7788" rel="noreferrer" target="_blank">http://10.10.130.9:7788</a>&gt;;<br>
<span class="">&gt;         }<br>
&gt;         on db-2 {<br>
&gt;             volume 0 {<br>
&gt;                 device       /dev/drbd0 minor 0;<br>
&gt;                 disk         /dev/vdc1;<br>
&gt;                 meta-disk    internal;<br>
&gt;             }<br>
&gt;             address          ipv4 <a href="http://10.10.130.10:7788" rel="noreferrer" target="_blank">10.10.130.10:7788</a><br>
</span>&gt;     &lt;<a href="http://10.10.130.10:7788" rel="noreferrer" target="_blank">http://10.10.130.10:7788</a>&gt;;<br>
<div><div class="h5">&gt;         }<br>
&gt;         options {<br>
&gt;             on-no-data-accessible io-error;<br>
&gt;         }<br>
&gt;         net {<br>
&gt;             protocol           C;<br>
&gt;             allow-two-primaries yes;<br>
&gt;             after-sb-0pri    discard-zero-changes;<br>
&gt;             after-sb-1pri    discard-secondary;<br>
&gt;             after-sb-2pri    disconnect;<br>
&gt;             sndbuf-size       1M;<br>
&gt;             rcvbuf-size       2M;<br>
&gt;             max-buffers      131072;<br>
&gt;             max-epoch-size   20000;<br>
&gt;             cram-hmac-alg    sha1;<br>
&gt;             shared-secret    db;<br>
&gt;         }<br>
&gt;         disk {<br>
&gt;             on-io-error      detach;<br>
&gt;             disk-flushes      no;<br>
&gt;             disk-barrier      no;<br>
&gt;             resync-rate       1G;<br>
&gt;             al-extents       257;<br>
&gt;             c-plan-ahead       8;<br>
&gt;             c-fill-target    25M;<br>
&gt;             c-max-rate        1G;<br>
&gt;             c-min-rate       100M;<br>
&gt;         }<br>
&gt;         startup {<br>
&gt;             wfc-timeout       30;<br>
&gt;             outdated-wfc-timeout  20;<br>
&gt;             degr-wfc-timeout  30;<br>
&gt;             become-primary-on both;<br>
&gt;         }<br>
&gt;     }<br>
&gt;<br>
&gt;<br>
&gt; I have tried to change some of variables, but no matter I have done, the<br>
&gt; performance is just around 70MB/s like dd result below.<br>
&gt;<br>
&gt;     [root@db-1 ~]# dd if=/dev/zero of=/dev/drbd0 bs=4194304 count=1000<br>
&gt;     1000+0 records in<br>
&gt;     1000+0 records out<br>
&gt;     <a href="tel:4194304000" value="+14194304000">4194304000</a> bytes (4.2 GB) copied, 61.7918 s, 67.9 MB/s<br>
&gt;<br>
&gt;<br>
&gt; The same test to the backing storage can give aroud 700MB/s performance.<br>
&gt; What should I do with this case?<br>
&gt;<br>
&gt; Best regards,<br>
<br>
</div></div>There are a few things here;<br>
<br>
1. DRBD has sensible defaults. Start by dramatically simplifying your<br>
config to only the specifics you need. Tune later after you have a<br>
baseline. You&#39;ll find, I suspect, your tuning won&#39;t change much, or<br>
often actually hurt performance.<br>
<br>
2. Your test is flawed because dd uses caching unless you specify dsync.<br>
Set that and also use a larger write file (I&#39;d recommend minimum of 2x RAM).<br>
<br>
3. You need to also test the network connection between the two nodes.<br>
Use sperf or similar to ensure you are actually getting the network link<br>
speed you expect.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Digimer<br>
Papers and Projects: <a href="https://alteeve.com/w/" rel="noreferrer" target="_blank">https://alteeve.com/w/</a><br>
&quot;I am, somehow, less interested in the weight and convolutions of<br>
Einstein’s brain than in the near certainty that people of equal talent<br>
have lived and died in cotton fields and sweatshops.&quot; - Stephen Jay Gould<br>
</font></span></blockquote></div><br></div>