Rsync performance increase through buffering

Dave Dykstra dwd at
Tue Jan 14 14:38:00 EST 2003

Craig, I'd like to get your patch into the 2.5.6 patches directory.
Could you please make sure it applies cleanly onto version 2.5.6pre1 (see
news on home page if you haven't been following
the mailing list) and repost it?


- Dave Dykstra

On Wed, Dec 11, 2002 at 03:20:57PM -0600, Dave Dykstra wrote:
> On Sun, Dec 08, 2002 at 11:48:57PM -0800, Craig Barratt wrote:
> > I've been studying the read and write buffering in rsync and it turns
> > out most I/O is done just a couple of bytes at a time.  This means there
> > are lots of system calls, and also most network traffic comprises lots
> > of small packets.  The behavior is most extreme when sending/receiving
> > file deltas of identical files.
> ...
> > Below is a patch to a few files that adds read and write buffering in
> > the places where the I/O was unbuffered, adds buffering to write_file()
> > and removes the unneeded gettimeofday() system call in show_progress().
> ...
> > However, on a network test doing a send from cygwin/WinXP to rsyncd
> > on rh-linux the running time improves from about 700 seconds to 215
> > seconds (with a cpu load of around 17% versus 58%, if you believe
> > cygwin's cpu stats).  This is probably an extreme case since the system
> > call penalty in cygwin is high.  But I would suspect a significant
> > improvement is possible with a slow network connection, since a lot
> > less data is being sent.
> Looks like a good candidate for the "patches" directory now and for
> integration in 2.6.0.
> - Dave

More information about the rsync mailing list