DO NOT REPLY [Bug 3461] rsync is not atomic when temp-dir is on different device

bugzilla-daemon at bugzilla-daemon at
Sat Jan 28 23:45:53 GMT 2006

------- Comment #2 from Simen.Gaure at  2006-01-28 16:45 MST -------
I was a bit unclear, it's not that it's just a different device, it's a
different physical disk.

For a dataset of about 45GB we see an rsync time of about 2 hrs. When we use a
temp-dir on another disk it drops to about 30 minutes. 

We have measured it and traced the performance problem down to the following:
When the temporary file is on the same disk as the target, rsync must read the
old file and the network, it also must write the temporary file, to the same
disk as it reads from. It turns out that both the read and write speed of the
disk drops substantially compared to separate disks. This is probably because
the disk head needs to move between reads and writes, it doesn't move
infinitely fast.  

With separate disks, there's a single-stream read from one disk and a
single-stream write to the other disk.  When copying afterwards, it's still
single-streams to each disk, and we get close to 40MB/s.  When we do
intertwined reads and writes to the same disk, we get far less, in some cases
only 5MB/s.  Even with the extra copy, the dual-disk solution runs faster, the
only problem being non-atomicity.

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list