Skip to main content
Memvid files have configurable storage capacity to help you manage resources effectively. This page explains how capacity works and how to manage it.

Capacity Tiers

When creating a memory file, you can specify the storage tier:

Creating with a Tier


Checking Capacity

CLI

Output:

JSON Output

Python SDK

Node.js SDK


Capacity Exceeded Errors

When you try to add content that would exceed the file’s capacity, you’ll get a CapacityExceeded error (MV001).

CLI

Python SDK

Node.js SDK


Managing Capacity

Reclaiming Space

After deleting documents, reclaim unused space:

Moving to a Larger File

If you need more capacity, create a new file and migrate:

WAL Size and Capacity

The Write-Ahead Log (WAL) size scales with file capacity: The WAL checkpoints automatically when it reaches 75% capacity, or you can force a checkpoint with seal().

Monitoring Capacity

Environment Variables

In Scripts


Best Practices

Capacity Planning

  1. Start small: Begin with the free tier for testing
  2. Monitor usage: Check storage_utilisation_percent regularly
  3. Plan ahead: Upgrade before hitting capacity limits
  4. Use compression: Enable vector compression for large collections

Storage Optimization

  1. Batch ingestion: Use put_many() for better storage efficiency
  2. Vector compression: 16x smaller vectors with minimal quality loss
  3. Clean up deletions: Run --vacuum after bulk deletes
  4. Choose appropriate tier: Match tier to your use case

Error Handling

Always handle capacity errors gracefully:

Next Steps

Memory Architecture

Understand the internal structure of .mv2 files

Troubleshooting

Solve common capacity and error issues