Bug#579213: Please allow an option to posix_fadvise files read not to be cached
Package: unison
Version: 2.32.52-1
Severity: wishlist
Hello,
thank you for maintaining unison.
My laptop has 2GB of RAM, but sometimes I want to sync directory trees
with a similar order of magnitude of data in them. When unison scans the
local data, linux has a tendency to swap out running application to free
RAM for caching the data that unison reads. The result is that while
unison is running, my laptop is thrashing heavily as the kernel loads
back from swap those apps that it just swapped.
I'm running with default kernel VM settings. Running unison under
nocache (http://www.enricozini.org/2010/tips/nocache/) does not cause
the thrashing and keeps the system perfectly usable during syncs, if a
bit slower I/O wise, which is perfectly reasonable.
I am of course the first to agree that the problem in this is not in
unison but in Linux itself. The operating system should not swap out
running apps: this behaviour is preposterous, and everytime I experience
it a part of my soul dies drowned by its own tears.
It might still make sense, however, to have an option in unison
(disabled by default) that turns on fadvise cache hinting. One would
turn it on when syncing big, seldom accessed archives like photo
galleries or music collections, and keep it off when syncing the home
dir with files that are accessed often.
Even more ideal would be to be able to turn it on/off on a per-directory
basis, so that I can sync my home dir and have the system cache
everything except pictures, music and videos.
Cheers,
Enrico
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages unison depends on:
ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib
Versions of packages unison recommends:
ii openssh-client [ssh-client] 1:5.3p1-3 secure shell (SSH) client, for sec
unison suggests no packages.
-- no debconf information
Reply to: