Skip to content

2 Comments

  1. Craig Hughes
    March 25, 2011

    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:

    1. HUGE FILE IN CACHE
    2. PATCHED RSYNC OF SOME GINORMOUS FILE
    3. HUGE FILE NOT IN CACHE ANYMORE

    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.

  2. March 26, 2011

    @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.