Rsync performance increase through buffering
Dave Dykstra
dwd at drdykstra.us
Wed Dec 11 21:22:01 EST 2002
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