Skip to content

Commit 9628172

Browse files
hyperpolymathclaude
andcommitted
feat: optional RAM promotion for octad acceleration
Tiered storage with per-modality RAM promotion/demotion. DISABLED by default. EXPLICIT opt-in only. Constraints: - Max 2 octads promoted simultaneously (crash safety) - Max 5 minutes in RAM before forced demotion - Only if estimated speedup >= 2x (MIN_SPEEDUP_FACTOR) - RAM budget enforced (default 1GB) - All data ALWAYS on disk via WAL — RAM is read cache only - WAL on disk is source of truth, never tmpfs - On crash: WAL replays, RAM overlay lost, zero data loss API: - PromotionManager::new() — disabled by default - enable(budget) / disable() - decide(modalities, data_size, disk_time, ram_time) → Promote/Skip/Blocked - promote(modality, size) / demote(modality) / demote_all() - enforce_timeouts() — auto-demotes expired promotions - history() — full promotion/demotion event log 8 tests: disabled default, enable+promote, max-2 limit, demote frees slot, RAM budget enforcement, speedup threshold, demote_all, history tracking. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5bb3b94 commit 9628172

2 files changed

Lines changed: 476 additions & 0 deletions

File tree

verisimdb/rust-core/verisim-octad/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ pub use store::{OctadSnapshot, InMemoryOctadStore};
3838
pub mod query_octad;
3939
pub use query_octad::{QueryOctadBuilder, QueryExecution};
4040

41+
// Optional RAM promotion for acceleration (disabled by default)
42+
pub mod ram_promotion;
43+
pub use ram_promotion::{PromotionManager, Modality, PromotionDecision, PromotionEvent};
44+
4145
// ACID transaction manager for cross-modality atomicity
4246
pub mod transaction;
4347
pub use transaction::{IsolationLevel, LockType, TransactionManager, TransactionError, TransactionState};

0 commit comments

Comments
 (0)