Expand description
§SSD Rerank Executor with IO Coalescing (Task 8)
Provides efficient hybrid RAM+SSD reranking with:
- IO coalescing for locality
- Strict IO budget enforcement
- Tail-latency guardrails
§Architecture
- Map candidate IDs to disk offsets
- Sort offsets and coalesce into minimal IO ranges
- Enforce IO budget and stop early if needed
- Cache admission for hot vectors
§Math/Algorithm
Coalescing: O(R log R) sort + O(R) interval merge Tail guardrails: online control via capped outstanding IO ops
§Usage
ⓘ
use sochdb_vector::ssd_rerank::{RerankExecutor, RerankConfig, RerankRequest};
let config = RerankConfig::default()
.io_budget(100)
.coalesce_threshold(4096);
let executor = RerankExecutor::new(config, storage);
let results = executor.rerank(&candidates, &query);Structs§
- Coalesce
Stats - Coalescing statistics
- IoCoalescer
- Coalesces random reads into sequential ranges
- IoRange
- A coalesced IO range
- Mock
Storage - Mock storage for testing
- Rerank
Candidate - A candidate for reranking
- Rerank
Config - Configuration for SSD rerank executor
- Rerank
Executor - Executes SSD-based reranking with IO coalescing
- Rerank
Result - Result from reranking
- Rerank
Stats - Statistics from rerank execution
- Vector
Cache - Simple LRU cache for hot vectors
Type Aliases§
- Distance
Fn - Distance function type
- Storage
Reader - Storage reader type