MS MeiliSizer Instant-Search Spec & Cost Matrix
MeiliSizer Matrix / Search Blueprints / typesense-in-memory-formula
BLUEPRINT 02 • TYPESENSE RESIDENT RAM SIZING

Typesense Pure In-Memory RAM Formula & Linux OOM-Killer Prevention Guide

MeiliSizer Blueprint Summary: Typesense achieves blazing 5–7ms p99 searches by holding every inverted token and facet array in resident C++ memory. Here is how to calculate exact RAM before OOM strikes.

The Hard Resident Memory Ceiling in Typesense (MeiliSizer Guide)

Typesense writes raw documents to RocksDB on NVMe so unindexed display fields do not consume RAM. However, every field marked index: true or facet: true expands 2.5x–3.0x inside C++ heap structures (ART radix trees + posting lists). If batch imports push resident memory past 85% of VPS RAM, jemalloc heap fragmentation and OS buffers will trigger Linux OOM-Killer.

Typesense Schema Optimization (Separating Display vs Indexed Fields)

// Typesense Collection Schema — Keep image_url & html_desc out of RAM!
{
  "name": "catalog_products",
  "fields": [
    { "name": "title", "type": "string", "index": true, "infix": false },
    { "name": "brand", "type": "string", "facet": true },
    { "name": "category_ids", "type": "int32[]", "facet": true },
    { "name": "price_cents", "type": "int32", "sort": true },
    { "name": "image_url", "type": "string", "index": false, "optional": true },
    { "name": "long_html_spec", "type": "string", "index": false, "optional": true }
  ],
  "default_sorting_field": "price_cents"
}

MeiliSizer RAM & NVMe Tier Matrix for TYPESENSE-CPP-RAM

Catalog Scale Hot Working Set Safe Peak RAM Matched Spec Tier
250K Docs (1.5 KB, 58% Indexed) 1.1 GB Resident RAM 2.3 GB Safe Floor Hostinger KVM 2 8GB DDR5 ($5.99/mo)
1M Docs (4.0 KB, 45% Indexed) 5.4 GB Resident RAM 9.8 GB Safe Floor Hostinger KVM 4 16GB DDR5 ($10.49/mo)
5M Docs (4.0 KB, 45% Indexed) 25.5 GB Resident RAM 39.0 GB Safe Floor UltaHost VDS 64GB Dedicated ($95/mo)
MeiliSizer Public Vendor Pricing Sources (Retrieved 2026-11-12): Public rates retrieved 2026-11-12 from official vendor pages; promotional & renewal prices may change — always verify exact billing cycles, regional stock, and renewal terms on the vendor’s official checkout page before purchasing.

MeiliSizer Production Checklist: TYPESENSE-CPP-RAM

  • Mark non-searchable display fields (thumbnails, URLs, HTML descriptions) with "index": false so they sit purely on RocksDB NVMe.
  • Disable "infix": true unless substring SKU matching is strictly required — infix trees add 1.4x extra RAM.
  • Maintain at least 32% free physical RAM headroom above steady-state RSS to absorb JSONL batch upsert spikes.
  • Use int32 timestamps and price_cents instead of variable-length strings for sorting and range filters.
#1 DDR5 NVME FOR MEILISEARCH

Hostinger KVM DDR5 NVMe VPS (1-Click Docker / Meilisearch) — MeiliSizer Pick

Up to 67% OFF + Extra 20% Partner Discount • 8GB–32GB DDR5 RAM + PCIe Gen4 NVMe for LMDB Mmap

Inspect Hostinger KVM on MeiliSizer ($5.99+/mo) →
DEDICATED RAM VDS • VECTOR & 20M DOCS

UltaHost Dedicated VDS (Zero-Steal Cores for Typesense & Vector HNSW) — MeiliSizer Option

100% Dedicated Physical CPU & DDR5 RAM (0% Steal) • Singapore, Tokyo, EU & US • Unmetered Traffic

Inspect UltaHost VDS on MeiliSizer ($37.5+/mo) →

Load Workload in MeiliSizer Matrix →

MeiliSizer Engineering FAQ: TYPESENSE-CPP-RAM

Does Typesense load unindexed JSON fields into RAM?

No. Since Typesense v0.22+, fields omitted from the schema or marked index: false stay on disk inside RocksDB and are only read from NVMe for the top 10–20 matched documents per query.

When should I pick Typesense over Meilisearch?

Pick Typesense when you want predictable sub-7ms C++ tail latency, built-in 3-node Raft clustering without external orchestrators, or strict schema validation.

Related MeiliSizer Search Blueprints (TYPESENSE-CPP-RAM)