What is preload-ng?
preload-ng is an adaptive readahead daemon. It runs in the background, watches which programs you start, predicts which ones you will start next, and reads their binaries and shared libraries into the page cache ahead of time, so the browser, editor or IDE you open every morning starts from RAM instead of from disk. It is a fork of preload-rs, the Rust rewrite of the classic preload daemon, and adds a least-squares prediction model, fanotify file-open monitoring that also sees short-lived programs, a terminal UI (preload-ng top), a status socket and hit-rate metrics. It is written in Rust and is Apache-2.0 licensed.
master. This repository builds a snapshot every Friday when master has moved, versioned <cargo version>.<YYYYMMDD> (for example 0.4.0.20261204), so apt upgrade brings you the week's changes without a Rust toolchain. Debian does not package preload-ng at all.
⚡ Key Features of preload-ng
🧠 Learns Your Habits
It records which programs run together and when, and keeps that model across reboots, so the longer it runs the better its guesses get. Nothing to configure for it to start learning.
📈 Smarter Prediction
preload-ng adds a least-squares prediction model ("delta") that the classic daemon never had, for sharper guesses about which program you will open next.
👁️ Sees Short-Lived Programs
fanotify file-open monitoring catches programs that start and exit between two scans, which a periodic scan of running processes can miss.
📺 preload-ng top
A terminal UI that shows what the daemon has learned, what it is preloading right now and how often a launch was already in cache, read live from its status socket.
⚙️ A Ready Service
Like PostgreSQL or OpenSSH, the package enables and starts its systemd service on install and restarts it on upgrade. Configuration is optional and reloads without a restart.
🧓 Older Kernels Too
It detects the fanotify and cachestat features of Linux 5.19, 6.0 and 6.5 at start-up and falls back when they are missing, so Bookworm's 6.1 kernel runs it too, with reduced monitoring.
apt upgrade keeps you on the latest version.
📦 Installation from deb.griffo.io
Step 1: Add Repository
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(. /etc/os-release; echo ${DEBIAN_CODENAME:-${UBUNTU_CODENAME:-${VERSION_CODENAME%% *}}}) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
sudo apt updateinstall -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(. /etc/os-release; echo ${DEBIAN_CODENAME:-${UBUNTU_CODENAME:-${VERSION_CODENAME%% *}}}) main" | tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
apt updatesudo apt install extrepo
sudo extrepo enable griffo
sudo apt update🆓 A free repository covers 7 of 75 tools. deb-free.griffo.io needs no account or subscription, but it carries only 7 of the 75 tools: cliamp, Forgejo Runner, Ghostty, lazydocker, Oh My Posh, Uncloud and Zed. preload-ng is not one of them, so the repository above is the only apt source for it; the .deb itself stays free on GitHub.
🧩 About the extrepo option. extrepo is Debian's own tool for external repositories: it writes the sources file and installs the signing key for you, checking the key against signed metadata first. This repository is registered with it as griffo, and the free repository as griffo-free, so on Debian (bookworm, trixie, forky and sid) the commands above are the whole setup.
extrepo sets up the sources file and the key only, so a subscription's credentials still go in /etc/apt/auth.conf.d/deb.griffo.io.conf. Ubuntu is not covered, because extrepo publishes metadata for Debian suites only: there, use the sudo or root commands.
Step 2: Install preload-ng
# Install latest preload-ng; the service is enabled and started right away
sudo apt install preload-ng
# Check the daemon is running
systemctl status preload-ng# Install latest preload-ng; the service is enabled and started right away
apt install preload-ng
# Check the daemon is running
systemctl status preload-ngStep 3: First run
# See what it has learned and what it is preloading
sudo preload-ng top
# Optional: join the preload-ng group to run it without sudo
sudo adduser $USER preload-ng
# log out and back in, then:
preload-ng top# See what it has learned and what it is preloading
preload-ng top
# Optional: join the preload-ng group to run it without adduser $USER preload-ng
# log out and back in, then:
preload-ng top🎯 Basic Usage Examples
The service:
# Status and recent log lines
systemctl status preload-ng
journalctl -u preload-ng -n 50
# Stop it for now, or keep it from starting at boot
sudo systemctl stop preload-ng
sudo systemctl disable preload-ng# Status and recent log lines
systemctl status preload-ng
journalctl -u preload-ng -n 50
# Stop it for now, or keep it from starting at boot
systemctl stop preload-ng
systemctl disable preload-ngConfiguration:
# Optional: start from the example, which lists every setting
sudo mkdir -p /etc/preload-ng
sudo cp /usr/share/doc/preload-ng/examples/config.example.toml /etc/preload-ng/config.toml
sudo nano /etc/preload-ng/config.toml
# Drop-in files are read too: /etc/preload-ng/config.d/*.toml
# Apply changes without losing what it learned
sudo systemctl reload preload-ng# Optional: start from the example, which lists every setting
mkdir -p /etc/preload-ng
cp /usr/share/doc/preload-ng/examples/config.example.toml /etc/preload-ng/config.toml
nano /etc/preload-ng/config.toml
# Drop-in files are read too: /etc/preload-ng/config.d/*.toml
# Apply changes without losing what it learned
systemctl reload preload-ngRemoving it:
# Remove keeps the learned state in /var/lib/preload-ng/state.db
sudo apt remove preload-ng
# Purge deletes the learned state too
sudo apt purge preload-ng# Remove keeps the learned state in /var/lib/preload-ng/state.db
apt remove preload-ng
# Purge deletes the learned state too
apt purge preload-ng🔧 Tool Integrations
preload-ng sits between systemd, the kernel's page cache and the programs you launch:
- systemd: the
preload-ngunit is enabled and started on install, restarted on upgrade, andsystemctl reload preload-ngapplies a new configuration in place - The classic preload package: preload-ng declares
Conflicts: preload, so installing it removes the archive'spreload(preload 0.6.4 in Bookworm and Trixie); the two do the same job and must not run side by side - The preload-ng group: the package creates a system group and the service runs with
Group=preload-ng; members can open its status socket, sopreload-ng topworks without sudo - Per-user service: a user unit ships too, disabled;
systemctl --user enable --now preload-ngruns a copy for your own session instead - The Linux kernel: fanotify and cachestat are used when the running kernel has them and skipped when it does not, with no setting to change
- Memory: preloaded files live in the ordinary page cache, which the kernel drops first when a program needs the RAM
🚀 Why Choose deb.griffo.io?
- Official Debian: does not package preload-ng,
apt install preload-ngfails on a stock system; only the classicpreloadis there (preload 0.6.4 in Bookworm and Trixie) - Upstream downloads: there are none: upstream publishes no releases, tags or binaries
- cargo build from source: a clone, a Rust toolchain and a few minutes of compiling, plus a systemd unit, a group and a state directory you set up yourself, all repeated by hand whenever
mastermoves - deb.griffo.io: latest version with automatic updates
- ✅ Built From Upstream master: compiled from upstream's source each week; the release notes name the exact upstream commit of each snapshot
- ✅ Ready-Made Service: enabled and started on install, restarted on upgrade, running under its own
preload-nggroup - ✅ Keeps What It Learned:
apt removeleaves/var/lib/preload-ng/state.dbin place for a later reinstall,apt purgedeletes it - ✅ Automatic Updates: each new snapshot arrives through a plain
apt upgrade - ✅ Two Architectures: amd64 and arm64 on Bookworm, Trixie, Forky and Sid; there is no i386 or armhf build
- ✅ Multi-Distribution: works on Bookworm, Trixie, Forky and Sid
- ✅ Easy Maintenance: standard apt commands for updates
📦 Package Build Repository
The Debian packages are automatically built and maintained in this GitHub repository:
- 🔮 preload-ng-debian - Weekly snapshot builds
🔗 Related Packages
Also available from deb.griffo.io:
- bottom - A system monitor to watch memory and the page cache while preload-ng works
- Fastfetch - A fast system information tool that shows your kernel, memory and disks at a glance
- lnav - A log file navigator for reading the journal and other system logs
- zoxide - A smarter cd that, like preload-ng, learns from what you do most
preload who wants its actively developed successor.
💝 Support This Project
If this repository saves you time and effort, please consider supporting it!