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.

It also has the advantage of working with all filesystem types on
Linux, which O_DIRECT does not.

However, there are times when O_DIRECT is useful, and I do use it in a
file copying application of mine to control cache memory.

-- Jamie
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to