A simple utility to improve system performance by caching inodes, meant to be run on startup.
The basic idea behind dircacher is that a program will first have to check if a file exists before it
can be opened (whether this is handled by the kernel in a TOCTOU safe manner is irrelevant). And that there
exist programs that will not actually open any files but instead read their metadata.
All that dircacher does is read every inode on given subfolders, without traversing symlinks or separate filesystems, in a
multithreaded fashion. On a linux system with enough spare RAM, this will store the filesystem tree including metadata in the "fscache",
leading to decreased latency when a user is interacting with any part of the filesystem.
In my experience, this has made my computer noticeably snappier after a reboot and takes very little time to do its work;
3 HDD RAID5 array with 1M inodes + 256GB SATA SSD with 2M inodes cached completely in 1m45sec 1m22sec (as of 0.4.0).
Others are welcome to share their own startup times and experience with dircacher, perhaps a table could be made
Go to the latest release for a prepackaged tarball
- Run
arch-prepare.shto load source files into thearch-pkgdirectory cdinto thearch-pkgdirectorymakepkgto build the pacman packagepacman -Uto install to your system
An example:
./arch-prepare.sh
cd arch-pkg
makepkg
sudo pacman -U dircacher-bin{VERSION_HERE}.tar.zstRepeat arch installation steps and convert the generated arch package to a deb/rpm using a tool. I might add rpm/deb packages at another point
Write newline delimited folder names to /etc/dircachertab
For example on a btrfs system that splits home and root into two subvolumes:
$ cat /etc/dircachertab
/
/home