libeatmydata mod to save read caches of other processes, wraps read() with posix_fadvise calls.

Fedja Beader 59491677d8 Initial commit vor 9 Jahren
LICENSE 59491677d8 Initial commit vor 9 Jahren
README.md 59491677d8 Initial commit vor 9 Jahren
libcachesave-105.c 59491677d8 Initial commit vor 9 Jahren
modify_libcachesave 59491677d8 Initial commit vor 9 Jahren

README.md

LibCacheSave

A modification of the libeatmydata library to stop I/O intensive processes from impacting system interactivity (namely, destroying kernel's read caches and causing other processes to get swapped out).

Despite being based on libeatmydata, it removes all of libeatmydata's data eating functionality.

wraps read()s with posix_fadvise calls (see man posix_fadvise)

primarily designed for:

  • rsync (backup) runs
  • clamscan runs
  • btrfs "offline" deduplication (bedup)

Installation:

  • acquire libeatmydata source tarball
  • run modify_libcachesave in it
  • copy the included .c file over libcachesave/libcachesave.c in the modified tarball
  • ./configure ...
  • make
  • make install

Usage in GNU Bash:

reallynice ()
{
    nice -n 19 ionice -c idle cachesave "$@"
}

reallynice rsync ...

security:

all commits should be signed by my code signing key: E6F8 B408 DD3A 7911 B4F1 2B3D 4A76 437C 16F2 FC4C