Skip to content

miguel-b-p/preload-ng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

111 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preload-NG

License: GPL v2 C Linux

An adaptive readahead daemon that prefetches files to reduce application startup times on Linux systems.

Note: This is a maintained fork of the original preload project, discontinued since 2009.


About

Preload monitors which applications you use and learns your usage patterns through Markov chains. It predicts which applications you're likely to run next and preloads their binaries and shared libraries into memory.

For detailed documentation, configuration, and troubleshooting, see doc/README.md.


Quick Install

Using Precompiled Binary

git clone https://github.com/miguel-b-p/preload-ng.git
cd preload-ng/scripts
sudo bash install.sh

Building from Source

git clone https://github.com/miguel-b-p/preload-ng.git
cd preload-ng/scripts
bash build.sh

Using Nix Flakes

# Build the package
nix build github:miguel-b-p/preload-ng

# Run directly
nix run github:miguel-b-p/preload-ng

# Enter development shell
nix develop github:miguel-b-p/preload-ng

NixOS Configuration

Add to your flake.nix:

{
  inputs.preload-ng.url = "github:miguel-b-p/preload-ng";

  outputs = { self, nixpkgs, preload-ng, ... }: {
    nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {
      modules = [
        preload-ng.nixosModules.default
        {
          services.preload-ng.enable = true;
        }
      ];
    };
  };
}

All settings from preload.conf are available as declarative options via services.preload-ng.settings. A debug option is also available to enable verbose output. See doc/README.md for the complete configuration reference.

NixOS service check

To ensure the service is running you can run:

systemctl status preload-ng

Another way of ensuring the service is running is to check that the state file exists and contains a state with:

sudo cat /var/lib/preload/preload.state

Origin & Credits

Original Author: Behdad Esfahbod — Created in 2005 as part of Google Summer of Code, mentored by Fedora Project.

Contributors: Ziga Mahkovec, Soeren Sandmann, Arjan van de Ven, bert hubert, Elliot Lee


About This Fork

The original project was last updated in April 2009 (v0.6.4). Preload-NG aims to:

  • Maintain compatibility with modern Linux kernels
  • Fix bugs and memory leaks
  • Implement originally planned features

See changelogs/README.md for the detailed changelog.


Project Structure

preload-ng/
├── preload-src/  # Source code
├── doc/          # Documentation
├── changelogs/   # Version changelogs
└── scripts/      # Utility scripts (build.sh)

License

GNU General Public License v2 — See LICENSE


Links