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:
- Monitoring which applications you run
- Learning your usage patterns using statistical models
- Predicting which applications youβre likely to run next
- 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
- Automatic operation: Once installed, preheat runs without intervention
- Low overhead: Minimal CPU usage (<1%) and controlled memory consumption
- Adaptive learning: Improves predictions as it learns your habits
- Safe defaults: Conservative settings that work well out of the box
Secondary Goals
- systemd integration for proper service management
- Flexible configuration for power users
- Graceful handling of low-memory conditions
- Persistent state across reboots
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)
- systemd-readahead recorded boot-time file access and replayed it
- Preheat learns ongoing usage patterns, not just boot sequences
- Preheat adapts to changing workflows
vs. preload (original)
- Preheat is based on preloadβs concepts
- Updated for modern systems and systemd
- Enhanced configuration options
- Maintained and actively developed
vs. Early-OOM / zram
- These tools manage memory pressure
- Preheat proactively fills available memory with useful data
- They can work together complementarily
Supported Environments
Operating Systems
Preheat works on any Debian-based Linux distribution:
- Debian 11+
- Ubuntu 20.04+
- Linux Mint
- Other apt-based distributions
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
- Slower storage (HDD, SATA SSD) with unused RAM sitting idle
- Repetitive workflows β launching the same apps daily
- Older hardware where cold starts feel noticeably slow
- Desktop/laptop use with predictable launch patterns
When Preheat Helps Less
- Fast NVMe storage β already quick startup times
- Very limited RAM (<2 GB) β no headroom for caching
- Server workloads β persistent services, not interactive apps
- Random usage patterns β unpredictable usage defeats prediction
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:
- Install preheat - Get it running on your system
- Quick start guide - Verify itβs working
- Configuration - Customize for your needs
Navigation
| Previous | Up | Next |
|---|---|---|
| - | Documentation Index | Installation β |