Skip to content

Latest commit

 

History

40 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nova Cache

A kernel-level disk caching system for Windows that accelerates HDD read performance by caching hot data in RAM and SSD tiers.

Overview

Nova Cache uses a Windows Minifilter Driver (C, WDK) and a user-mode service (Rust, tokio) to implement transparent three-tier disk caching:

Tier Medium Speed Purpose
L1 RAM (shared memory) Nanoseconds Fastest tier — hot data
L2 SSD (memory-mapped file) Microseconds Warm data — persistent across reboots
HDD Physical disk Milliseconds Cold reads — cache misses only

The driver intercepts every ReadFile/WriteFile call at the kernel level, checks L1 and L2 directories in shared memory, and serves hits directly — bypassing the physical disk. Cache misses and writes are forwarded to the service via a ring buffer, which then promotes data into L1/L2 using an ARC (Adaptive Replacement Cache) policy with TinyLFU admission filter.

Features

  • Transparent caching — no drive letters, mount points, or manual configuration required
  • 3-tier architecture — RAM (L1) → SSD (L2) → HDD (origin), with automatic promotion
  • Adaptive replacement (ARC + TinyLFU) — self-tuning eviction that adapts to workload
  • Write-back caching — coalesces writes and flushes asynchronously to the backing disk
  • Adaptive prefetch — ETW-driven read pattern detection with variable window (1–64 MB)
  • HDD read coalescing — merges sequential reads into fewer syscalls to reduce seek overhead
  • Memory-mapped L2 — zero-copy I/O via memmap2 for minimal latency
  • Per-process shared memory — per-PID sections for isolation
  • Performance monitoring — real-time stats via IPC including hit rate, latency, and boost multiplier
  • Graphical monitor — egui dashboard for metrics and configuration

Quick Start

Windows 10+ x64 only. Requires Administrator privileges and Windows Test Mode.

⚠️ Windows Test Mode Required

The kernel driver uses a self-signed test certificate (created automatically by dev.bat).
Windows must be in Test Mode to load an unsigned test-signed driver:

bcdedit /set testsigning on

Then reboot before running dev.bat.

To revert later:

bcdedit /set testsigning off

Build & Run

Open Command Prompt as Administrator and run:

dev.bat

That's it. The script will:

  1. Install the Rust toolchain if missing (via rustup)
  2. Detect or install Visual Studio Build Tools with C++ workload and WDK (for driver building)
  3. Build the kernel driver (Novacache.sys) via MSBuild
  4. Build the Rust service via cargo
  5. Create a self-signed test certificate and sign the driver
  6. Start nova-cache-service

All steps are idempotent — completed steps are skipped on subsequent runs.

dev.bat --force    # force rebuild all

Configuration

After the first run, edit config/nova_cache.toml to configure caching:

L1 Cache (RAM)

L1 is enabled by default with 512 MB of shared memory. Adjust in the config:

[cache]
l1_size_mb = 512    # increase if you have more RAM available

L2 Cache (SSD)

L2 is disabled by default. To enable SSD caching:

  1. Edit config/nova_cache.toml:
    [cache.l2]
    enable = true
    path = 'X:\l2_cache.dat'    # path on an SSD (NOT your OS drive)
    size_gb = 50                 # size in GB
  2. Restart the service: dev.bat

Tip: Use a dedicated SSD or a separate partition for L2. Do not use your OS drive — it defeats the purpose of caching.

Cached Volumes

By default, no volumes are cached. To enable caching for a drive:

  1. Edit config/nova_cache.toml and add a volume:
    [[volumes]]
    volume = "D"        # drive letter (no colon)
    enabled = true
  2. Restart the service: dev.bat

Or use the GUI dashboard to add/remove volumes interactively.

Game Mode

Game mode boosts cache priority for game/application processes:

[game_mode]
enabled = true
priority_boost = 2.0    # multiply cache priority for detected games
detect_games = true     # auto-detect game processes

Repository Structure

crates/
├── nova-cache-core         — Core caching logic (ARC, TinyLFU, L1/L2/HDD backends)
├── nova-cache-service      — Windows service (tokio async runtime, IPC, flush thread)
├── nova-cache-gui          — Graphical monitor (egui)
├── nova-cache-monitor      — Prefetch engine, stats collection
├── nova-cache-driver-comm  — Shared memory protocol definitions
├── nova-cache-kdu          — KDU driver loading interop
├── nova-bench              — Benchmarking tool
└── nova-stress             — Stress testing tool
driver/
└── novacache               — Minifilter driver (C, WDK)
config/                     — Configuration files
scripts/                    — Build and management scripts

Attribution

Built with:

About

Free and powerful app for boost any HDD for windows 10+

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages