Skip to content

feat: Add smart memory configuration for DiskANN#16

Merged
yichuan-w merged 1 commit into
mainfrom
feat/diskann-smart-memory
Aug 4, 2025
Merged

feat: Add smart memory configuration for DiskANN#16
yichuan-w merged 1 commit into
mainfrom
feat/diskann-smart-memory

Conversation

@andylizf

@andylizf andylizf commented Aug 4, 2025

Copy link
Copy Markdown
Collaborator

Summary

Auto-configure DiskANN memory parameters based on data size and system specs.

Changes

  • search_memory_maximum: 1/10 of embedding size (controls PQ compression)
  • build_memory_maximum: 50% of available RAM (controls sharding)
  • Automatic fallback to defaults if manually specified

Benefits

  • Optimal performance for different dataset sizes
  • Better memory utilization on various hardware
  • No manual tuning required

Testing

✅ Tested with small dataset (8 vectors, 768 dims)
✅ No crashes, successful index building
✅ Memory allocation as expected

- Add intelligent memory calculation based on data size and system specs
- search_memory_maximum: 1/10 of embedding size (controls PQ compression)
- build_memory_maximum: 50% of available RAM (controls sharding)
- Provides optimal balance between performance and memory usage
- Automatic fallback to default values if parameters are explicitly provided
@yichuan-w

Copy link
Copy Markdown
Collaborator

LGTB

@yichuan-w
yichuan-w merged commit dd71ac8 into main Aug 4, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants