Hi, We currently have upload servers in one data center(A), and users upload the images there. We have storage server in another data center(B). When users upload many images at the same time, we face sync difficulties. On B, we use rsync in server mode, with authentication. On A, we use `rsync -azpogtRv --safe-links 1/ rsync://user at serverB/img/ --password-file=/var/www/r.passwd ` Both ends run centos 5.3 X86_64. Any suggestions to optimize rsync in this case? Thank you in advance. 2010-01-11 xufengnju -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20100111/4413884d/attachment-0001.html>
Quoting xufengnju <xufengnju at sina.com>:> Hi, > > We currently have upload servers in one data center(A), and users > upload the images there. We have storage server in another data > center(B). When users upload many images at the same time, we face > sync difficulties. > > On B, we use rsync in server mode, with authentication. > On A, we use `rsync -azpogtRv --safe-links 1/ > rsync://user at serverB/img/ --password-file=/var/www/r.passwd ` > > Both ends run centos 5.3 X86_64. > > Any suggestions to optimize rsync in this case?Well, at least remove v (verbose) and possibly also z (compression) -- Eero
On Mon, Jan 11, 2010 at 4:36 AM, xufengnju <xufengnju at sina.com> wrote:> Hi, > > We currently have upload servers in one data center(A), and users upload the > images there. We have storage server in?another data center(B). When users > upload many images at the same time, we face sync difficulties. > > On B, we use rsync in server mode, with authentication. > On A, we use??`rsync -azpogtRv?--safe-links?1/ > rsync://user at serverB/img/?--password-file=/var/www/r.passwd ` > > Both ends run centos 5.3 X86_64. > > Any suggestions to optimize rsync in this case?You can add the following options: --ignore-times --delay-updates The first will speed up the comparison. The second can prevent some errors related to synchronization on the receiving side. BTW, have you considered using a DRBD volume with GFS? This might work better than rsync, depending on your configuration.