πŸ”₯ Preheat

Predict. Preload. Perform.

Adaptive readahead daemon for Linux

View on GitHub

Introduction to Preheat

Preheat is an adaptive readahead daemon that accelerates application startup times on Linux systems by intelligently preloading frequently used programs into memory.


What Preheat Does

When you launch an application, the operating system must read its executable file and shared libraries from disk into memory. On mechanical hard drives, this disk I/O is the primary bottleneck causing slow startup times. Even on SSDs, cold starts can be noticeably slower than warm starts.

Preheat solves this by:

  1. Monitoring which applications you run
  2. Learning your usage patterns using statistical models
  3. Predicting which applications you’re likely to run next
  4. Preloading those files into the disk cache proactively

The result: applications start faster because their files are already in memory when you launch them.


The Problem It Solves

Consider a typical workflow:

Without Preheat:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ You      β”‚ --> β”‚ Launch   β”‚ --> β”‚ Wait for β”‚ --> App Ready
β”‚ Click    β”‚     β”‚ Firefox  β”‚     β”‚ Disk I/O β”‚     (3-5 sec)
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

With Preheat:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Preheat  β”‚     β”‚ Firefox  β”‚     β”‚ You      β”‚
β”‚ Preloads β”‚     β”‚ Files in β”‚ --> β”‚ Click    β”‚ --> App Ready
β”‚ Firefox  β”‚     β”‚ Cache    β”‚     β”‚ Firefox  β”‚     (< 1 sec)
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Typical Improvements

Scenario Without Preheat With Preheat Improvement
Browser (cold start) 4-8 seconds 1-2 seconds 60-75%
IDE (cold start) 10-20 seconds 3-6 seconds 50-70%
Office suite 5-10 seconds 1-3 seconds 60-70%

Results vary based on hardware and usage patterns.


Design Goals

Primary Goals

  1. Automatic operation: Once installed, preheat runs without intervention
  2. Low overhead: Minimal CPU usage (<1%) and controlled memory consumption
  3. Adaptive learning: Improves predictions as it learns your habits
  4. Safe defaults: Conservative settings that work well out of the box

Secondary Goals


What Preheat Does NOT Do

Understanding limitations is as important as understanding capabilities:

Preheat Does NOT… Reason
Speed up running applications It only accelerates startup, not runtime
Help applications not in the prediction model New or rarely-used apps aren’t predicted
Work well with insufficient RAM Preloading requires free memory headroom
Improve SSD performance significantly SSDs are already fast; gains are marginal
Replace proper system optimization It complements, not replaces, other tuning

How It Differs from Similar Tools

vs. systemd-readahead (deprecated)

vs. preload (original)

vs. Early-OOM / zram


Supported Environments

Operating Systems

Preheat works on any Debian-based Linux distribution:

Hardware Requirements

Component Minimum Recommended
RAM 2 GB 4+ GB (more headroom for caching)
Storage Any Slower storage benefits most
Kernel 2.6+ 4.0+

When Preheat Helps Most

When Preheat Helps Less


Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      PREHEAT DAEMON                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   MONITORING   β”‚   PREDICTION   β”‚      PRELOADING       β”‚
β”‚                β”‚                β”‚                       β”‚
β”‚  /proc scanner β”‚  Markov chain  β”‚  readahead(2) calls   β”‚
β”‚  Process maps  β”‚  Correlation   β”‚  Parallel I/O         β”‚
β”‚  Library deps  β”‚  Scoring       β”‚  Memory management    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚                β”‚                    β”‚
        v                v                    v
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ State File    β”‚ β”‚ Config File  β”‚ β”‚ Disk Cache (kernel) β”‚
β”‚ (persistent)  β”‚ β”‚ (user)       β”‚ β”‚ (memory)            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

For detailed architecture documentation, see Architecture.


Getting Started

Ready to try preheat? Follow these steps:

  1. Install preheat - Get it running on your system
  2. Quick start guide - Verify it’s working
  3. Configuration - Customize for your needs

Previous Up Next
- Documentation Index Installation β†’