<blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px"></blockquote>Thanks Lars, for such a quick reply<br><br><blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px">

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Patches accepted.</blockquote>

<blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px">I&#39;m not sure if i&#39;m competent enough, i tried fixing the issue in trust where csync2 does not work with different identity certificates for different peers, but am not successful so far :(</blockquote>

<br><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> what csync2 is actually doing there<br>

  why it takes so long</blockquote><br>I noticed that the data transfer is happening at a 512 bytes per chunk which results in a large number of TCP request/response cycles and thus an added overhead and would also slow down transfer of data.<br>

<br>One reason could be the smaller chunks of data that the sender and receiver communicate with; if we know that we are dealing with larger files [by way of &#39;size&#39; attribute from &#39;chktext&#39; column, then it makes more sense to increase the chunk of data transfer from the present 512 bytes to some kilobytes [not exceeding 64K]<br>

<br></blockquote>Regards,<br>Samba<br><br>---------------------------------------------------------------------------------------------------------------------------------------------------------------------<br><blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px">

<br><div class="gmail_quote">On Mon, Mar 5, 2012 at 10:05 PM, Lars Ellenberg <span dir="ltr">&lt;<a href="mailto:lars.ellenberg@linbit.com">lars.ellenberg@linbit.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Mon, Mar 05, 2012 at 09:55:17PM +0530, Samba wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt;<br>
&gt; I&#39;m using CSYNC2 2.0-rc1 from the git stream on CENT OS 5.6 64 bit...<br>
&gt;<br>
&gt; CSync2 is consuming lot of cpu cycles and taking a lot of time [roughly,<br>
&gt; around 10 times] compared to SCP or RSYNC; are there any special options to<br>
&gt; make csync2 work like scp/rsync style copy for large files?<br>
&gt;<br>
&gt; If we clearly know that certain files will only be added to or removed from<br>
&gt; a directory and no modifications happen to any of those large files, then<br>
&gt; would it not be beneficial to just plainly copy instead of finding<br>
&gt; differences, infact there won&#39;t be any differences, just 1 or 0 for<br>
&gt; existence or  absence of file.<br>
<br>
</div>Patches accepted.<br>
<div class="im"><br>
&gt; I tried initializing the csync2 metadata database with csync2 -crI and then<br>
&gt; did an csync -x, but it is taking a lot of time even on a LAN when compared<br>
&gt; to other copy utilities like rsync or scp.<br>
&gt;<br>
&gt; One may ask why use csync2 and why not go with scp or rsync for such use<br>
&gt; cases; the only answer i can give is that those tools are no match for the<br>
&gt; flexibility and power of csync2 and i would want to address this use case<br>
&gt; also along with the other common scenarios that csync2 excels in.<br>
&gt;<br>
&gt; Please let me if there is any way where i can force csync2 to straightway<br>
&gt; sync the file like plain rsync and do not try to find diffs and thus<br>
&gt; improve speed and reduce resource consumption?<br>
&gt;<br>
&gt; Thanks and Regards,<br>
&gt; Samba<br>
</div>&gt; *<br>
<div class="im">&gt; *<br>
&gt;<br>
&gt; PS:<br>
&gt;<br>
&gt; Here are the results for times taken for copying a nearly 1 GB file between<br>
&gt; two hosts in the same LAN:<br>
&gt;<br>
</div>&gt; *SCP *<br>
<div class="im">&gt;<br>
&gt; [root@master~]# time scp /opt/test/installer.zip root@slave:/opt/test/<br>
&gt;<br>
&gt; real    0m35.041s<br>
&gt;<br>
&gt; user    0m11.590s<br>
&gt;<br>
&gt; sys     0m8.933s<br>
&gt;<br>
&gt;<br>
</div>&gt; *RSYNC*<br>
<div class="im">&gt;<br>
&gt; [root@master~]# time rsync /opt/test/installer.zip root@slave:/opt/test/<br>
&gt;<br>
&gt; real    0m32.724s<br>
&gt;<br>
&gt; user    0m10.987s<br>
&gt;<br>
&gt; sys     0m4.576s<br>
&gt;<br>
&gt;<br>
</div>&gt; *CSYNC2*<br>
<div class="im">&gt;<br>
&gt; [root@master~]# time csync2 -x<br>
<br>
</div>why not: time csync2 -x /opt/test/installer.zip<br>
<div class="im"><br>
&gt; real    5m53.171s<br>
&gt;<br>
&gt; user    4m19.255s<br>
&gt;<br>
&gt; sys     0m31.349s<br>
<br>
</div>I suggest you figure out what csync2 is actually doing there,<br>
why it takes so long.<br>
<br>
strace?<br>
add sufficient numbers of &quot;-v&quot;?<br>
<br>
Do you have thousands of files,<br>
and are unaware that -x implies -c,<br>
which implies a full recursive stat run?<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
: Lars Ellenberg<br>
: LINBIT | Your Way to High Availability<br>
: DRBD/HA support and consulting <a href="http://www.linbit.com" target="_blank">http://www.linbit.com</a><br>
<br>
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.<br>
_______________________________________________<br>
Csync2 mailing list<br>
<a href="mailto:Csync2@lists.linbit.com">Csync2@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/csync2" target="_blank">http://lists.linbit.com/mailman/listinfo/csync2</a><br>
</font></span></blockquote></div><br><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

 what csync2 is actually doing there</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

 why it takes so long</blockquote><br>I noticed that the data transfer is happening at a 512 bytes per chunk which results in a large number of TCP request/response cycles and thus an added overhead and would also slow down transfer of data.<br>

<br>One reason could be the smaller chunks of data that the sender and receiver communicate with; if we know that we are dealing with larger files [by way of &#39;size&#39; attribute from &#39;chktext&#39; column, then it makes more sense to increase the chunk of data transfer from the present 512 bytes to some kilobytes [not exceeding 64K]<br>

<br><br><br><div class="gmail_quote">On Mon, Mar 5, 2012 at 10:05 PM, Lars Ellenberg <span dir="ltr">&lt;<a href="mailto:lars.ellenberg@linbit.com">lars.ellenberg@linbit.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Mon, Mar 05, 2012 at 09:55:17PM +0530, Samba wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt;<br>
&gt; I&#39;m using CSYNC2 2.0-rc1 from the git stream on CENT OS 5.6 64 bit...<br>
&gt;<br>
&gt; CSync2 is consuming lot of cpu cycles and taking a lot of time [roughly,<br>
&gt; around 10 times] compared to SCP or RSYNC; are there any special options to<br>
&gt; make csync2 work like scp/rsync style copy for large files?<br>
&gt;<br>
&gt; If we clearly know that certain files will only be added to or removed from<br>
&gt; a directory and no modifications happen to any of those large files, then<br>
&gt; would it not be beneficial to just plainly copy instead of finding<br>
&gt; differences, infact there won&#39;t be any differences, just 1 or 0 for<br>
&gt; existence or  absence of file.<br>
<br>
</div>Patches accepted.<br>
<div class="im"><br>
&gt; I tried initializing the csync2 metadata database with csync2 -crI and then<br>
&gt; did an csync -x, but it is taking a lot of time even on a LAN when compared<br>
&gt; to other copy utilities like rsync or scp.<br>
&gt;<br>
&gt; One may ask why use csync2 and why not go with scp or rsync for such use<br>
&gt; cases; the only answer i can give is that those tools are no match for the<br>
&gt; flexibility and power of csync2 and i would want to address this use case<br>
&gt; also along with the other common scenarios that csync2 excels in.<br>
&gt;<br>
&gt; Please let me if there is any way where i can force csync2 to straightway<br>
&gt; sync the file like plain rsync and do not try to find diffs and thus<br>
&gt; improve speed and reduce resource consumption?<br>
&gt;<br>
&gt; Thanks and Regards,<br>
&gt; Samba<br>
</div>&gt; *<br>
<div class="im">&gt; *<br>
&gt;<br>
&gt; PS:<br>
&gt;<br>
&gt; Here are the results for times taken for copying a nearly 1 GB file between<br>
&gt; two hosts in the same LAN:<br>
&gt;<br>
</div>&gt; *SCP *<br>
<div class="im">&gt;<br>
&gt; [root@master~]# time scp /opt/test/installer.zip root@slave:/opt/test/<br>
&gt;<br>
&gt; real    0m35.041s<br>
&gt;<br>
&gt; user    0m11.590s<br>
&gt;<br>
&gt; sys     0m8.933s<br>
&gt;<br>
&gt;<br>
</div>&gt; *RSYNC*<br>
<div class="im">&gt;<br>
&gt; [root@master~]# time rsync /opt/test/installer.zip root@slave:/opt/test/<br>
&gt;<br>
&gt; real    0m32.724s<br>
&gt;<br>
&gt; user    0m10.987s<br>
&gt;<br>
&gt; sys     0m4.576s<br>
&gt;<br>
&gt;<br>
</div>&gt; *CSYNC2*<br>
<div class="im">&gt;<br>
&gt; [root@master~]# time csync2 -x<br>
<br>
</div>why not: time csync2 -x /opt/test/installer.zip<br>
<div class="im"><br>
&gt; real    5m53.171s<br>
&gt;<br>
&gt; user    4m19.255s<br>
&gt;<br>
&gt; sys     0m31.349s<br>
<br>
</div>I suggest you figure out what csync2 is actually doing there,<br>
why it takes so long.<br>
<br>
strace?<br>
add sufficient numbers of &quot;-v&quot;?<br>
<br>
Do you have thousands of files,<br>
and are unaware that -x implies -c,<br>
which implies a full recursive stat run?<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
: Lars Ellenberg<br>
: LINBIT | Your Way to High Availability<br>
: DRBD/HA support and consulting <a href="http://www.linbit.com" target="_blank">http://www.linbit.com</a><br>
<br>
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.<br>
_______________________________________________<br>
Csync2 mailing list<br>
<a href="mailto:Csync2@lists.linbit.com">Csync2@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/csync2" target="_blank">http://lists.linbit.com/mailman/listinfo/csync2</a><br>
</font></span></blockquote></div><br>I noticed that the data transfer is happening at a 512 bytes per chunk which results in a large number of TCP request/response cycles and thus an added overhead and would also slow down transfer of data.<br>

One reason could be the smaller chunks of data that the sender and receiver communicate with; if we know that we are dealing with larger files [by way of &#39;size&#39; attribute from &#39;chktext&#39; column, then it makes more sense to increase the chunk of data transfer from the present 512 bytes to some kilobytes [not exceeding 64K]<br>

<br><br><br><div class="gmail_quote">On Mon, Mar 5, 2012 at 10:05 PM, Lars Ellenberg <span dir="ltr">&lt;<a href="mailto:lars.ellenberg@linbit.com">lars.ellenberg@linbit.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Mon, Mar 05, 2012 at 09:55:17PM +0530, Samba wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt;<br>
&gt; I&#39;m using CSYNC2 2.0-rc1 from the git stream on CENT OS 5.6 64 bit...<br>
&gt;<br>
&gt; CSync2 is consuming lot of cpu cycles and taking a lot of time [roughly,<br>
&gt; around 10 times] compared to SCP or RSYNC; are there any special options to<br>
&gt; make csync2 work like scp/rsync style copy for large files?<br>
&gt;<br>
&gt; If we clearly know that certain files will only be added to or removed from<br>
&gt; a directory and no modifications happen to any of those large files, then<br>
&gt; would it not be beneficial to just plainly copy instead of finding<br>
&gt; differences, infact there won&#39;t be any differences, just 1 or 0 for<br>
&gt; existence or  absence of file.<br>
<br>
</div>Patches accepted.<br>
<div class="im"><br>
&gt; I tried initializing the csync2 metadata database with csync2 -crI and then<br>
&gt; did an csync -x, but it is taking a lot of time even on a LAN when compared<br>
&gt; to other copy utilities like rsync or scp.<br>
&gt;<br>
&gt; One may ask why use csync2 and why not go with scp or rsync for such use<br>
&gt; cases; the only answer i can give is that those tools are no match for the<br>
&gt; flexibility and power of csync2 and i would want to address this use case<br>
&gt; also along with the other common scenarios that csync2 excels in.<br>
&gt;<br>
&gt; Please let me if there is any way where i can force csync2 to straightway<br>
&gt; sync the file like plain rsync and do not try to find diffs and thus<br>
&gt; improve speed and reduce resource consumption?<br>
&gt;<br>
&gt; Thanks and Regards,<br>
&gt; Samba<br>
</div>&gt; *<br>
<div class="im">&gt; *<br>
&gt;<br>
&gt; PS:<br>
&gt;<br>
&gt; Here are the results for times taken for copying a nearly 1 GB file between<br>
&gt; two hosts in the same LAN:<br>
&gt;<br>
</div>&gt; *SCP *<br>
<div class="im">&gt;<br>
&gt; [root@master~]# time scp /opt/test/installer.zip root@slave:/opt/test/<br>
&gt;<br>
&gt; real    0m35.041s<br>
&gt;<br>
&gt; user    0m11.590s<br>
&gt;<br>
&gt; sys     0m8.933s<br>
&gt;<br>
&gt;<br>
</div>&gt; *RSYNC*<br>
<div class="im">&gt;<br>
&gt; [root@master~]# time rsync /opt/test/installer.zip root@slave:/opt/test/<br>
&gt;<br>
&gt; real    0m32.724s<br>
&gt;<br>
&gt; user    0m10.987s<br>
&gt;<br>
&gt; sys     0m4.576s<br>
&gt;<br>
&gt;<br>
</div>&gt; *CSYNC2*<br>
<div class="im">&gt;<br>
&gt; [root@master~]# time csync2 -x<br>
<br>
</div>why not: time csync2 -x /opt/test/installer.zip<br>
<div class="im"><br>
&gt; real    5m53.171s<br>
&gt;<br>
&gt; user    4m19.255s<br>
&gt;<br>
&gt; sys     0m31.349s<br>
<br>
</div>I suggest you figure out what csync2 is actually doing there,<br>
why it takes so long.<br>
<br>
strace?<br>
add sufficient numbers of &quot;-v&quot;?<br>
<br>
Do you have thousands of files,<br>
and are unaware that -x implies -c,<br>
which implies a full recursive stat run?<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
: Lars Ellenberg<br>
: LINBIT | Your Way to High Availability<br>
: DRBD/HA support and consulting <a href="http://www.linbit.com" target="_blank">http://www.linbit.com</a><br>
<br>
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.<br>
_______________________________________________<br>
Csync2 mailing list<br>
<a href="mailto:Csync2@lists.linbit.com">Csync2@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/csync2" target="_blank">http://lists.linbit.com/mailman/listinfo/csync2</a><br>
</font></span></blockquote></div><br>One reason could be the smaller chunks of data that the sender and receiver communicate with; if we know that we are dealing with larger files [by way of &#39;size&#39; attribute from &#39;chktext&#39; column, then it makes more sense to increase the chunk of data transfer from the present 512 bytes to some kilobytes [not exceeding 64K]</blockquote>

<br><br><br><div class="gmail_quote">On Mon, Mar 5, 2012 at 10:05 PM, Lars Ellenberg <span dir="ltr">&lt;<a href="mailto:lars.ellenberg@linbit.com">lars.ellenberg@linbit.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Mon, Mar 05, 2012 at 09:55:17PM +0530, Samba wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt;<br>
&gt; I&#39;m using CSYNC2 2.0-rc1 from the git stream on CENT OS 5.6 64 bit...<br>
&gt;<br>
&gt; CSync2 is consuming lot of cpu cycles and taking a lot of time [roughly,<br>
&gt; around 10 times] compared to SCP or RSYNC; are there any special options to<br>
&gt; make csync2 work like scp/rsync style copy for large files?<br>
&gt;<br>
&gt; If we clearly know that certain files will only be added to or removed from<br>
&gt; a directory and no modifications happen to any of those large files, then<br>
&gt; would it not be beneficial to just plainly copy instead of finding<br>
&gt; differences, infact there won&#39;t be any differences, just 1 or 0 for<br>
&gt; existence or  absence of file.<br>
<br>
</div>Patches accepted.<br>
<div class="im"><br>
&gt; I tried initializing the csync2 metadata database with csync2 -crI and then<br>
&gt; did an csync -x, but it is taking a lot of time even on a LAN when compared<br>
&gt; to other copy utilities like rsync or scp.<br>
&gt;<br>
&gt; One may ask why use csync2 and why not go with scp or rsync for such use<br>
&gt; cases; the only answer i can give is that those tools are no match for the<br>
&gt; flexibility and power of csync2 and i would want to address this use case<br>
&gt; also along with the other common scenarios that csync2 excels in.<br>
&gt;<br>
&gt; Please let me if there is any way where i can force csync2 to straightway<br>
&gt; sync the file like plain rsync and do not try to find diffs and thus<br>
&gt; improve speed and reduce resource consumption?<br>
&gt;<br>
&gt; Thanks and Regards,<br>
&gt; Samba<br>
</div>&gt; *<br>
<div class="im">&gt; *<br>
&gt;<br>
&gt; PS:<br>
&gt;<br>
&gt; Here are the results for times taken for copying a nearly 1 GB file between<br>
&gt; two hosts in the same LAN:<br>
&gt;<br>
</div>&gt; *SCP *<br>
<div class="im">&gt;<br>
&gt; [root@master~]# time scp /opt/test/installer.zip root@slave:/opt/test/<br>
&gt;<br>
&gt; real    0m35.041s<br>
&gt;<br>
&gt; user    0m11.590s<br>
&gt;<br>
&gt; sys     0m8.933s<br>
&gt;<br>
&gt;<br>
</div>&gt; *RSYNC*<br>
<div class="im">&gt;<br>
&gt; [root@master~]# time rsync /opt/test/installer.zip root@slave:/opt/test/<br>
&gt;<br>
&gt; real    0m32.724s<br>
&gt;<br>
&gt; user    0m10.987s<br>
&gt;<br>
&gt; sys     0m4.576s<br>
&gt;<br>
&gt;<br>
</div>&gt; *CSYNC2*<br>
<div class="im">&gt;<br>
&gt; [root@master~]# time csync2 -x<br>
<br>
</div>why not: time csync2 -x /opt/test/installer.zip<br>
<div class="im"><br>
&gt; real    5m53.171s<br>
&gt;<br>
&gt; user    4m19.255s<br>
&gt;<br>
&gt; sys     0m31.349s<br>
<br>
</div>I suggest you figure out what csync2 is actually doing there,<br>
why it takes so long.<br>
<br>
strace?<br>
add sufficient numbers of &quot;-v&quot;?<br>
<br>
Do you have thousands of files,<br>
and are unaware that -x implies -c,<br>
which implies a full recursive stat run?<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
: Lars Ellenberg<br>
: LINBIT | Your Way to High Availability<br>
: DRBD/HA support and consulting <a href="http://www.linbit.com" target="_blank">http://www.linbit.com</a><br>
<br>
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.<br>
_______________________________________________<br>
Csync2 mailing list<br>
<a href="mailto:Csync2@lists.linbit.com">Csync2@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/csync2" target="_blank">http://lists.linbit.com/mailman/listinfo/csync2</a><br>
</font></span></blockquote></div><br>