# pgvector HNSW RAM & Managed PostgreSQL Instance Sizing Calculator (FP32, halfvec, bit)

> PostgreSQL pgvector HNSW performance falls off a disk-I/O cliff the moment the index exceeds shared_buffers + OS page cache, and uncompressed FP32 vector(3072) columns fail outright above pgvector's 2,000-dimension page limit. Notice the live warning triggered in the FP32 preset above: switch quantization to FP16 halfvec to cut 10M-row 3,072d RAM to 77.6 GB, or offload vector search to Voxell Forge ($0 Turbo; < 14 GB GPU VPC).

Canonical URL: https://voxell.ai/tools/pgvector-ram-calculator/


## `pgvector` Resident HNSW Memory & HA PostgreSQL TCO Matrix (`3,072d` Vectors, `m = 16`)

<table>
  <thead>
    <tr>
      <th>Corpus Scale (Chunks)</th>
      <th>FP32 vector(3072)</th>
      <th>FP16 halfvec(3072) HNSW + RDS</th>
      <th>1-Bit bit(3072) + 4x Rescore</th>
      <th>Voxell Forge Elimination Path</th>
    </tr>
  </thead>
  <tbody>
    <tr><td><strong>1,000,000 vectors</strong></td><td>Blocked (>2000d) / 15.1 GB raw</td><td>7.8 GB RAM (~$860/yr RDS)</td><td>0.9 GB binary + rescore</td><td><strong>$468/yr Builder Cloud</strong></td></tr>
    <tr><td><strong>10,000,000 vectors</strong></td><td>Blocked (>2000d) / 151.1 GB raw</td><td>77.6 GB RAM (~$8,570/yr RDS)</td><td>9.2 GB binary + rescore</td><td><strong>$2,388/yr Team Cloud</strong></td></tr>
    <tr><td><strong>50,000,000 vectors</strong></td><td>Blocked (>2000d) / 755.5 GB raw</td><td>388.2 GB RAM (~$42,860/yr HA)</td><td>46.1 GB binary + rescore</td><td><strong>$29,995/yr Forge Local (< 14 GB VRAM)</strong></td></tr>
    <tr><td><strong>100,000,000 vectors</strong></td><td>Blocked (>2000d) / 1.48 TB raw</td><td>776.4 GB RAM (~$85,720/yr HA)</td><td>92.2 GB binary + rescore</td><td><strong>$29,995/yr Forge Local (< 14 GB VRAM)</strong></td></tr>
  </tbody>
</table>

## Exact `pgvector` HNSW Memory Equations & Failure Modes

- **Byte formula:** $\text{RAM} = 1.20 \times N \times (D \cdot b + 320)$, where $b = 4$ (`FP32`), $2$ (`halfvec`), or $0.125$ (`bit`), `320 B` covers `m = 16` HNSW neighbor lists + tuple headers, and `1.20x` provides OS cache and `maintenance_work_mem` headroom.
- **Keep OLTP lean:** Stuffing `77.6 GB` of HNSW pages into your transactional Supabase/RDS instance evicts customer B-tree indexes and triggers `SQLSTATE 57014` build timeouts.
- **Related fixes:** [Fix >2000 Dimensions Error](/errors/pgvector-column-cannot-have-more-than-2000-dimensions/), [Fix Filtered HNSW 0-Row Bug](/errors/pgvector-hnsw-filtered-query-returns-fewer-than-k-rows/), and [Fix Supabase 57014 Timeout](/errors/supabase-pgvector-statement-timeout-57014-hnsw-build/).

## Explore All Vendor Cost & Memory Calculators

- **[Master Vector RAM & TCO Calculator](/tools/vector-calculator/)** | **[OpenAI Cost](/tools/openai-embedding-cost-calculator/)** | **[Gemini Cost](/tools/gemini-embedding-cost-calculator/)** | **[Pinecone Cost](/tools/pinecone-cost-calculator/)** | **[pgvector RAM](/tools/pgvector-ram-calculator/)** | **[Vertex AI Search](/tools/vertex-ai-search-pricing-calculator/)** | **[AWS Bedrock KB](/tools/aws-bedrock-knowledge-bases-cost-calculator/)** | **[Cohere Rerank](/tools/cohere-rerank-cost-calculator/)** | **[MCP Agent Token Cost](/tools/mcp-agent-token-cost-calculator/)**

## Frequently Asked Questions

### How much maintenance_work_mem do I need to build a 10M-row halfvec(3072) HNSW index?

Provision at least 64 GB to 80 GB of maintenance_work_mem during CREATE INDEX CONCURRENTLY so the entire HNSW graph builds in RAM without 20x slower disk spill.

### How does Voxell Forge fit 10M+ retrieval into under 14 GB VRAM?

Voxell Forge combines compact Play 1 64-bit CUDA Cuckoo approximate membership filters with NVMe/object-backed span hydration and in-GPU neural reranking on one 24 GB GPU.

---

## Zero-Install Model Context Protocol (MCP) & Keyless Agent Verification

```bash
claude mcp add --transport http voxell-forge https://api.voxell.ai/mcp/try
```

- Keyless Retrieval Bake-Off: `POST https://api.voxell.ai/api/v1/agent/bakeoff`
- Keyless Contradiction X-Ray: `POST https://api.voxell.ai/api/v1/agent/xray`
- Machine-Readable Pricing JSON: `https://voxell.ai/api/v1/agent/pricing.json`
- Full LLM Authority Map: `https://voxell.ai/llms-full.txt`
