🔥 Preheat

Predict. Preload. Perform.

Adaptive readahead daemon for Linux

View on GitHub

Known Limitations

This document describes current limitations, design constraints, and “won’t fix” issues in Preheat.


Process Detection Limitations

1. Process Reuse Not Detected

Problem: When Firefox (or Chrome, etc.) opens a new window, it reuses the existing process instead of spawning a new one.

Impact:

Example:

# First Firefox launch
firefox               # âś… Counted as launch

# Opening new window (Ctrl+N)
firefox -new-window   # ❌ NOT counted (reuses existing process)

Workaround: None without deep integration

Requires:

Status: Won’t Fix - too invasive for daemon simplicity


2. Multi-Process Apps Increment Per Process

Problem: Electron/Chromium apps spawn multiple processes (main, renderer, GPU, etc.), each incrementing the counter.

Impact:

Mitigation:

Example:

$ pgrep -a code
12345 /usr/share/code/code (main process)
12346 /usr/share/code/code --type=renderer
12347 /usr/share/code/code --type=gpu-process
12348 /usr/share/code/code --type=utility
...

Each increments raw_launches, but weighted calculation handles it gracefully.

Status: Acceptable - working as designed


3. Interpreter Scripts Not Tracked Directly

Problem: Python/Bash scripts are tracked as /usr/bin/python3 not the script itself.

Impact:

Example:

./my-backup-script.py    # Tracked as: /usr/bin/python3
./my-game.py             # Also tracked as: /usr/bin/python3

Workaround: Use shebang with specific interpreter or compile to binary

Status: By Design - scripts don’t have stable paths


4. Sandboxed Applications Not Fully Supported ⚠️

Problem: Applications running in security sandboxes may block daemon access to /proc/PID/exe, preventing tracking and preloading.

Affected Technologies:

Technology Status Notes
Snap (Ubuntu) ❌ Not working AppArmor blocks /proc access
Firejail ⚠️ Likely broken Sandbox restricts /proc visibility
Docker/Podman ❌ Not working Different PID namespace
systemd-nspawn ❌ Not working Container isolation
Flatpak ⚠️ Untested Less restrictive, may work
AppImage âś… Works No sandbox
Native (apt/rpm) âś… Works Full /proc access

Technical Details:

# Normal app (works fine):
$ readlink /proc/12345/exe
/usr/bin/firefox

# Sandboxed app (blocked):
$ readlink /proc/67890/exe
readlink: /proc/67890/exe: Permission denied

Impact:

Workaround:

Status: Security Sandbox Limitation - cannot be fixed without changes to sandbox technologies


Prediction Limitations

4. Cannot Predict First-Time Launches

Problem: Preheat learns from history; brand new applications have no data.

Impact:

Mitigation:

Status: Inherent to ML approach


5. Unpredictable Workflows Not Helped

Problem: Random, one-off usage has no pattern to learn.

Example:

Day 1: Firefox → Gimp → Blender
Day 2: Terminal → Vim → GCC
Day 3: LibreOffice → Inkscape → Audacity

No patterns = No predictions

Status: Out of Scope - preheat optimizes repetitive workflows


Storage Limitations

Problem: Apps launched via different symlinks are tracked under canonical path.

Impact:

Example:

$ firefox         # Tracked as: /usr/lib/firefox-esr/firefox-esr
$ x-www-browser   # Also tracked as: /usr/lib/firefox-esr/firefox-esr

Status: Working as Designed - prevents duplicate tracking


7. Large State Files on Heavily-Used Systems

Problem: Tracking hundreds of apps with complex Markov chains grows state file.

Impact:

Benchmarks: | Apps Tracked | State File Size | Load Time | |————–|—————–|———–| | 50 | 80 KB | 30ms | | 150 | 240 KB | 90ms | | 500+ | 1.2 MB | 280ms |

Mitigation:

Status: Acceptable - rare edge case


Memory Management Limitations

8. Cannot Force Kernel to Keep Cache

Problem: Kernel may evict preloaded data under memory pressure.

Impact:

Example:

19:00 - Preheat preloads Firefox (120 MB)
19:05 - User compiles large project (needs RAM)
19:10 - Kernel evicts Firefox from cache
19:15 - User launches Firefox → COLD START (preload wasted)

Mitigation:

Status: Linux Kernel Limitation - by design


9. SSD Performance Gains Are Modest

Problem: SSDs (especially NVMe) are already fast; preloading shows minimal improvement.

Reality Check:

Storage Type Cold Start With Preheat Improvement
HDD (5400 RPM) 8.5s 3.2s 62% âś…
SSD (SATA) 2.1s 1.3s 38% âś…
NVMe 1.1s 0.9s 18% ⚠️

Recommendation: Most beneficial on HDD systems

Status: Physics Limitation - fast storage needs less help


Configuration Limitations

10. No Per-Application Memory Limits

Problem: Cannot limit preloading budget per app (e.g., “max 50 MB for games”).

Impact:

Workaround:

Status: Future Enhancement - would add complexity


11. Prediction Threshold Not Auto-Tuning

Problem: Fixed 0.30 threshold for preloading; doesn’t adapt to system load.

Better Design:

Status: Future Enhancement - would require load-aware logic


Security/Privacy Limitations

12. State File Reveals User Behavior

Problem: State file contains complete application history and patterns.

Privacy Impact:

Mitigation:

Status: Inherent Trade-off - learning requires history


Platform Limitations

13. Linux-Only

Problem: Uses Linux-specific interfaces (/proc, readahead(2)).

Status: By Design - no Windows/macOS port planned


14. Requires Root (for readahead)

Problem: readahead(2) syscall requires root privileges.

Workaround: None - systemd runs daemon as root

Status: Linux Kernel Requirement


Summary

Category Limitation Severity Status
Detection Process reuse not detected Medium Won’t Fix
Detection Multi-process over-counting Low Acceptable
Detection Sandboxed apps (Snap, Docker, Firejail) High Platform Limit
Prediction First-time apps Low Mitigated
Storage Symlink canonicalization Low By Design
Memory Kernel eviction Medium Unavoidable
Performance NVMe gains modest Low Physics
Security Privacy exposure Medium Documented

Reporting New Limitations

Found a limitation not listed here?

  1. Check if it’s a bug (unexpected) or constraint (expected)
  2. If constraint: Open issue with “limitation” label
  3. If bug: Open regular bug report

Remember: Not every constraint is fixable - some are fundamental trade-offs!