Skip to main content
Memvid is designed for high performance out of the box, but different use cases benefit from different configurations. This guide covers tuning options for ingestion speed, search latency, storage efficiency, and retrieval quality.

Quick Recommendations


Ingestion Performance

Parallel Ingestion

For large folders, enable parallel processing:
Performance comparison:

Skip Embeddings

For lexical-only search or when you’ll add embeddings later:
Benefits:
  • 10x faster ingestion
  • 60% smaller file size
  • Full lexical search still available

Embedding Model Selection

Choose based on speed/quality tradeoff:

Search Performance

Search Mode Selection

Adaptive Retrieval

Adaptive retrieval automatically adjusts result count based on query relevance. Disable for consistent performance:

Scope Filtering

Narrow search scope for faster results:

Sketch Index

For very large memories (100k+ frames), build a sketch index for faster approximate search:
Sketch variants:

Storage Optimization

Memory Size

Set appropriate size limits:
Size recommendations:

Vacuum and Compact

After deletions or updates, reclaim space:

Index Selection

Disable indexes you don’t need:
Storage impact:

RAG Performance

Model Selection

Choose synthesis model based on needs:

Context-Only Mode

Skip synthesis for maximum speed:
Use cases:
  • Feed context to your own LLM
  • Debugging retrieval quality
  • Batch processing

Index Maintenance

Rebuild Indexes

Periodically rebuild for optimal performance:
When to rebuild:
  • After many deletions (>20% of content)
  • Search results seem slow or inaccurate
  • After model upgrade

Verify Integrity

Check for corruption:

Benchmarks

Typical performance on M1 Mac with SSD:

Ingestion Speed

Search Latency

Ask Latency


SDK Performance Tips

Python

Node.js


Monitoring

Query Tracking

Monitor usage patterns:

Memory Statistics


Troubleshooting Performance

Slow Ingestion

  1. Enable parallel ingestion: --parallel-segments
  2. Use smaller embedding model: -m bge-small
  3. Skip embeddings if not needed: --embedding-skip
  1. Use lexical mode for exact matches: --mode lex
  2. Build sketch index for large memories
  3. Narrow scope: --scope "relevant/path/"

High Memory Usage

  1. Use smaller embedding model
  2. Create with --no-vec if lexical is sufficient
  3. Vacuum after deletions: --vacuum

Large File Size

  1. Enable no-vec mode
  2. Vacuum to reclaim deleted space
  3. Use smaller embedding model

Next Steps

Embedding Models

Model comparison