MeiliSizer Engineering Methodology: LMDB Mmap, Resident RAM, Vector HNSW & Algolia TCO Math
Sizing a search engine by total raw database gigabytes alone either wastes money (indexing unsearched HTML blobs) or causes 3 AM OOM crashes (ignoring inverted index and vector graph expansion). MeiliSizer models memory from the tokenizer and storage-engine layer up.
MeiliSizer 1. Searchable JSON Share & 2.2x–3.5x Inverted Index Expansion
In real e-commerce and SaaS schemas, compact 0.5 KB records have ~72% searchable/filterable fields, whereas 10 KB CMS articles have ~34% indexed metadata alongside unindexed body/thumbnail attributes. MeiliSizer multiplies active searchable payload bytes by 2.2x for Meilisearch v1.11+ LMDB hot OS Page Cache (Roaring Bitmaps + FST prefix automatons), 2.85x for Typesense resident C++ ART radix indices, and 3.5x for Hybrid BM25 + semantic metadata structures.
MeiliSizer 2. --max-indexing-memory & Blue/Green Atomic Swap Peak RAM
Steady-state search memory is only half the story. During nightly catalog syncs or atomic /swap-indexes rebuilds, Meilisearch spawns Rayon indexing arenas governed by --max-indexing-memory, while Typesense buffers concurrent RocksDB/ART batch upserts (requiring >=32% free RAM headroom to prevent jemalloc fragmentation OOMs). Our Peak RAM output sums steady-state working set, active indexing arena, QPS thread scratchpads, and 16% Linux kernel reserve — plus 2.0x NVMe disk capacity for zero-downtime staging indices.
MeiliSizer 3. Hybrid Semantic Vector HNSW / Arroy Overhead Math
When Hybrid Search is selected, MeiliSizer adds quantized 768-dimension vector index overhead (~1.0 KB per document including Arroy LMDB trees / HNSW graph links, equating to ~0.95 GB per 1M documents) plus embedder daemon buffers, and steps up vCPU allocations for SIMD cosine/Hamming distance evaluation within the <15ms keystroke SLA.
MeiliSizer 4. Algolia Grow/Elevate & Meilisearch Cloud TCO Model + Partner Disclosure
We compare recommended flat-rate NVMe VPS/VDS pricing against standard published pay-as-you-go rates ($0.50/1K queries + $0.40/1K records for keyword search; $1.00/1K queries + $0.50/1K records for AI hybrid search after 10K free allowances) and managed cloud tiers. MeiliSizer is 100% free and independent. Outbound /go/ links use HTTP 302 redirects with Cache-Control: no-store and X-Robots-Tag: noindex, nofollow, and may earn partner commissions from Hostinger, Vultr, UltaHost, InterServer, or ChemiCloud at zero extra cost to you.
// Summary of MeiliSizer Engine Math (src/meili-sizer-engine.mjs)
rawDatasetGb = (docCount * avgJsonKb * 1024) / (1024 ** 3);
searchableGb = rawDatasetGb * searchableFieldShare; // 0.34 .. 0.72
lexicalIndexGb = searchableGb * engineMultiplier; // 2.2x (LMDB) | 2.85x (Typesense) | 3.5x (Hybrid)
vectorHnswGb = (docCount * vectorBytesPerDoc) / (1024 ** 3);
indexedWorkingGb = baseDaemonGb + lexicalIndexGb + vectorHnswGb + (peakQps * 0.0022);
indexingPeakRamGb = max(effectiveWorkingGb + indexingArenaGb + osReserveGb, typesenseSafeFloorGb);
savedVsAlgoliaUsd = algoliaMonthlyBill - recommendedNvmeVpsMonthlyUsd;