--o-direct option

Matt McCutchen matt at mattmccutchen.net
Thu Feb 28 13:18:26 GMT 2008

On Thu, 2008-02-28 at 07:15 +0000, Jamie Lokier wrote:
> Jerome Haltom wrote:
> > The problem is that during the rsync process the user's machine is
> > barely usable. The reason is because rsync reads these 2GB files... many
> > GBs of them. This causes the user's machine to repeatidly trash the page
> > cache. This really is Linux's fault. It should realize the relative
> > priority of the two apps and prevent rsync from trashing the cache. But
> > it doesn't.
> > 
> > Allowing rsync to specific O_DIRECT would circumvent the page cache
> > completely. Preventing the cache from being trashed.
> On Linux, fadvise(POSIX_FADV_DONTNEED) trailing behind the read/write
> position is more appropriate for this, I suspect.

Tobias Oetiker wrote a patch to rsync that uses fadvise to minimize the
effect on the page cache:


The distributed patch "drop-cache.diff" is an older version of this
patch.  Wayne, would you care to update it?


More information about the rsync mailing list