Memory & RAG
~9 min readUpdated: December 2026

Slate-ANN in Rust: Disk-Backed Vector RAG with SCAN I/O & Int8

Slate-ANN Rust Disk-Backed Vector Search with Elevator SCAN I/O Scheduler and Int8 Quantization

Slate-ANN (arXiv:2612.00002, github.com/microsoft/Slate-ANN) is a disk-backed approximate nearest-neighbor engine built from scratch in Rust around a storage-aware query cost model. By combining sequential block layout, an elevator (SCAN) I/O scheduler, graph-aware relabeling, int8/float16 disk vectors, and a PQ fetch gate, Slate-ANN reaches 0.968 recall on SIFT1M in 361.7 MB—nearly half the footprint of FAISS HNSW (~660 MB).

Technical Review: Smoke Monkey Core Architecture Team
Tested on Node.js 18+ & BunTypeScript 5.x
Quick Answer & Executive Definition

Slate-ANN in Rust: Disk-Backed Vector RAG with SCAN I/O & Int8: Slate-ANN (arXiv:2612.00002, github.com/microsoft/Slate-ANN) is a disk-backed approximate nearest-neighbor engine built from scratch in Rust around a storage-aware query cost model. By combining sequential block layout, an elevator (SCAN) I/O scheduler, graph-aware relabeling, int8/float16 disk vectors, and a PQ fetch gate, Slate-ANN reaches 0.968 recall on SIFT1M in 361.7 MB—nearly half the footprint of FAISS HNSW (~660 MB). Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.

Key Architectural Takeaways
Quick Implementation Exampleslate-ann-rag-agent.ts
slate-ann-rag-agent.tstypescript
import { createAgent } from '@smoke-monkey/harness';
// Coding & Retrieval Agent querying a Rust Slate-ANN disk-backed vector MCP service
const agent = createAgent({
agentId: 'slate-ann-rag-retriever',
provider: 'openai-compatible',
model: 'Qwen/Qwen3-32B',
baseUrl: process.env.VLLM_BASE_URL || 'http://127.0.0.1:8000/v1',
apiKey: process.env.VLLM_API_KEY || 'local-key',
workspacePath: process.cwd(),
permissions: {
read_file: 'allow',
write_file: 'allow',
run_command: 'ask',
},
mcpServers: {
slateVector: {
command: './target/release/slate-ann-mcp',
args: ['--index', './data/corpus.slate', '--quant', 'int8', '--ef-search', '256'],
},
},
});
async function main() {
const result = await agent.run(
'Retrieve the top 10 architectural RFC chunks matching storage-coalesced ANN traversal and summarize trade-offs.'
);
console.log('Slate-ANN RAG answer:', result.summary);
}
main().catch(console.error);
Video Guides

Watch: Related Video Guides

Vector Search & Approximate Nearest Neighbors (ANN) | FAISS (HNSW & IVF)

Scale Vector Search to Production: HNSW, IVF, PQ & DiskANN Explained

Why HNSW Hits a Memory Wall and Why Hop Count Fails on Disk

Mainstream RAG vector engines rely on in-memory HNSW graphs, assuming both adjacency lists and full-precision float32 embeddings reside in RAM. At 1 billion 128-dimensional vectors, that requires roughly 760 GB of RAM. Yet simply moving HNSW vectors onto disk collapses throughput: arXiv:2612.00002 measures an identical query workload running ~4,000x slower from cold disk than warm RAM despite identical graph hop counts, because random disk seeks are orders of magnitude slower than sequential transfers.

Slate-ANN (written in Rust) minimizes QueryCost = TraversalCost + StorageAccessCost + DistanceComputationCost instead of raw hop count alone.

Engine / Mode (SIFT1M 128-d)Memory / Total FootprintRecall@10Modeled Cost ($/mo)Storage Strategy
Slate-ANN (`int8`)361.7 MB (~247 MB RAM graph + 132 MB disk)0.968–0.97$1.24Sequential block + SCAN + PQ gate
FAISS HNSW~660 MB (all RAM)0.999$2.26Full RAM-resident graph & vectors
FAISS IVF-PQ~90 MB (all RAM)0.589$0.31Compressed RAM centroids
DiskANN1.98 GB SSD~0.95–0.99SSD-boundCo-located 4 KB random SSD sectors

Inside Slate-ANN: Relabeling, SCAN Scheduling, Narrow Types & PQ Gate

Slate-ANN stacks five complementary storage optimizations inside its Rust engine:

  1. Graph-Aware Relabeling: Assigns contiguous physical IDs to graph neighbors so traversal candidates cluster within nearby disk blocks.
  2. Sequential Block Layout & Elevator (SCAN) Scheduler: Batches pending vector fetches and sweeps storage offsets monotonically instead of issuing thrashing random seeks.
  3. Narrow On-Disk Vectors (`float16` / `int8`): Halves or quarters disk bandwidth per fetched candidate with negligible recall loss.
  4. Product-Quantization (PQ) Fetch Gate: Uses compact in-memory codes to skip disk I/O for low-probability neighbors.
  5. AVX2 SIMD Kernels: On AMD Zen3, Slate-ANN executes L2 distance in 12.99 ns (128-d), 35.94 ns (384-d), and 83.96 ns (768-d), reaching 0.9800 Recall@10 at 1,359 QPS in warm RAM (m=32, ef_search=256).

Right-Sizing Graph Degree (m) & Beam (ef_search)

In Slate-ANN benchmarks, m=32 with ef_search=256 delivers 0.9800 Recall@10 at 1,359 QPS, whereas m=8 caps at 0.8529 even at ef_search=512—allocate graph degree before widening search beams.

Building & Benchmarking Slate-ANN Locally in Rust

Clone the Microsoft Research repository, build with native AVX2 target flags, and benchmark int8 disk-backed recall versus RAM footprints:

bash
# 1. Clone and compile Slate-ANN in release mode with native CPU SIMD
git clone https://github.com/microsoft/Slate-ANN.git
cd Slate-ANN
RUSTFLAGS="-C target-cpu=native" cargo build --release

# 2. Run cargo unit tests & vector distance microbenchmarks
cargo test --release
./target/release/slate-ann --help

Integrate Slate-ANN as a zero-cloud local retrieval server for Smoke Monkey Canvas agent teams indexing monorepos, legal corpora, or millions of code chunks on a single workstation SSD.

Google Search Questions & Answers

Frequently Asked Questions

Q:How does Slate-ANN compare to FAISS HNSW and DiskANN?

On SIFT1M, Slate-ANN int8 achieves 0.968–0.97 recall in 361.7 MB (~247 MB RAM graph + ~132 MB int8 disk vectors), roughly half FAISS HNSW’s ~660 MB RAM footprint (0.999 recall) and far smaller than DiskANN’s 1.98 GB SSD footprint while avoiding FAISS IVF-PQ’s 0.589 recall ceiling.

Q:Why does Slate-ANN use an elevator (SCAN) I/O scheduler?

Random disk seeks can make an identical hop-count graph search run 4,000x slower from cold disk than warm RAM. SCAN scheduling orders reads sequentially across storage blocks to eliminate seek thrashing.

Q:What programming language is Slate-ANN written in?

Slate-ANN is implemented from scratch in Rust with AVX2 SIMD kernels for L2, inner-product, and cosine distances.

Q:Can Slate-ANN work on 384-d and 768-d RAG embeddings?

Yes. The paper benchmarks AVX2 SIMD distance kernels across 128-d (12.99 ns L2), 384-d (35.94 ns L2), and 768-d (83.96 ns L2) embedding dimensions.

Related Alternatives & Comparisons

Related Architecture Guides

View all guides

Build with Smoke Monkey Harness

Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.

npm install smoke-monkey-harness