Improving Linux performance by preserving Buffer Cache State : handy -- a patch to rsync(1) which will not disturb the buffer cache, so that large file transfers and backups will not interfere with what's been cached previously
performance linux caching buffer-cache rsync io cache patches backups
#
Surely it will disturb the buffer cache, possibly flushing stuff out while the file is being I/Od. It'll then just immediately free that buffer cache space up for re-use. But anything that was in the cache before the rsync happens may get flushed. ie:
After step #2, assuming the rsync was on a file big enough to push other stuff out of the cache while it's being operated on, then at the end of the process, you don't end up with the cache left as it was in stage 1, it could just now be completely empty.
@Craig rsync will transfer the file in portions, and so can invalidate the cache for the bit it has written. Note, it's important that rsync specifies to drop cache only for the specific portion it has processed so far, so that any read ahead caching is still effective.