Re:Tired of explaining Linux's seemingly obtuse memory usage...
by js2 on Tuesday February 01, 2011 @08:54PM
(#2168509)
Funny, I just noticed this in the Mac OS X rsync man page for the very first time:
--cache
Apple specific option to enable filesystem caching of rsync file
i/o Otherwise fcntl(F_NOCACHE) is used to limit memory growth.
Re:Tired of explaining Linux's seemingly obtuse memory usage...
by Nick_C on Wednesday February 02, 2011 @12:49AM
(#2169207)
There was a patch for all architectures, but it got dropped after 3.07 (current is 3.09). Andrew wrote "I don't feel this patch is general enough nor straight-forward enough to make it into rsync."
See these for more: http://insights.oetiker.ch/linux/fadvise/ https://bugzilla.samba.org/show_bug.cgi?id=7004
Never say never. You can and should disable/purge linux buffer caching in certain situations. See O_DIRECT and/or POSIX_FADV_DONTNEED. If I'm writing a database, I take care of my own caching, I do not need the OS doing it as well. Also, if I'm doing a huge rsync of a directory tree, just because I just read every byte of every file in that tree, I most certainly do not want to load all of that crap into the linux buffer cache. It will evict my already warm set, as well as potentially cause a ton of swapping.