<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18854">
<STYLE>@font-face {
        font-family: 宋体;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-STYLE: normal; FONT-FAMILY: Verdana; COLOR: windowtext; FONT-WEIGHT: normal; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
UNKNOWN {
        FONT-SIZE: 10pt
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt">
<DIV><FONT color=#000080 size=2 face=Verdana></FONT> </DIV>
<DIV><FONT color=#000080>We are now doing on the work to reduce the amount of 
images that would be compared before rsync many of which maybe aready exist on 
the receiving end.</FONT></DIV>
<DIV><FONT color=#000080>After we do a successful rsync, we log the images 
transfered, and we use another script to delete them on the send end. And that 
turns out to be helpful in this case.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#000080 size=2 face=Verdana></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face=Verdana></FONT> </DIV>
<DIV><FONT color=#c0c0c0 size=2 face=Verdana>2010-01-12 </FONT></DIV><FONT 
color=#000080 size=2 face=Verdana>
<HR style="WIDTH: 100px" align=left color=#b5c4df SIZE=1>
</FONT>
<DIV><FONT color=#c0c0c0 size=2 face=Verdana><SPAN>xufengnju</SPAN> 
</FONT></DIV>
<HR color=#b5c4df SIZE=1>

<DIV><FONT size=2 face=Verdana><STRONG>发件人:</STRONG> Kwan Lowe </FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>发送时间:</STRONG> 2010-01-11  21:14:58 
</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>收件人:</STRONG> CentOS mailing list 
</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>抄送:</STRONG> </FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>主题:</STRONG> Re: [CentOS] rsync 
optimization </FONT></DIV>
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV><FONT size=2 face=Verdana>
<DIV>On Mon, Jan 11, 2010 at 4:36 AM, xufengnju <xufengnju@sina.com> wrote:</DIV>
<DIV>> Hi,</DIV>
<DIV>></DIV>
<DIV>> We currently have upload servers in one data center(A), and users upload the</DIV>
<DIV>> images there. We have storage server in another data center(B). When users</DIV>
<DIV>> upload many images at the same time, we face sync difficulties.</DIV>
<DIV>></DIV>
<DIV>> On B, we use rsync in server mode, with authentication.</DIV>
<DIV>> On A, we use  `rsync -azpogtRv --safe-links 1/</DIV>
<DIV>> rsync://user@serverB/img/ --password-file=/var/www/r.passwd `</DIV>
<DIV>></DIV>
<DIV>> Both ends run centos 5.3 X86_64.</DIV>
<DIV>></DIV>
<DIV>> Any suggestions to optimize rsync in this case?</DIV>
<DIV></DIV>
<DIV>You can add the following options:</DIV>
<DIV>--ignore-times</DIV>
<DIV>--delay-updates</DIV>
<DIV></DIV>
<DIV>The first will speed up the comparison. The second can prevent some</DIV>
<DIV>errors related to synchronization on the receiving side.</DIV>
<DIV></DIV>
<DIV>BTW, have you considered using a DRBD volume with GFS?  This might</DIV>
<DIV>work better than rsync, depending on your configuration.</DIV>
<DIV>_______________________________________________</DIV>
<DIV>CentOS mailing list</DIV>
<DIV>CentOS@centos.org</DIV>
<DIV>http://lists.centos.org/mailman/listinfo/centos</DIV>
<DIV></DIV></FONT></DIV></BODY></HTML>