Cost Models & Sizing
PostgreSQL 16 JSONB Storage, GIN Indexes & Autovacuum for Survey Data
Size Postgres shared_buffers (256–1,024 MB) and NVMe disk consumption for up to 9 million cumulative JSONB survey responses.
~2.2 KB/row w/ Indexes -> 250k Resp/Mo = ~22 GB over 36 Months
Balancing shared_buffers Against Container Memory Limits
Allocating 25–33% of PostgreSQL container RAM to shared_buffers (256 MB on KVM 2, 512 MB on KVM 4, 1,024 MB on KVM 8) keeps active survey metadata and recent response indexes resident in memory without starving Node.js SSR.
NVMe Backup & pg_dump Retention Headroom
Compressed nightly pg_dump snapshots of 1 million survey responses compress to roughly 450–650 MB, leaving ample space on 100–400 GB Hostinger NVMe drives for 30-day rolling backups.
36-Month Cost & Capacity Breakdown
| Monthly Responses | Annual DB Growth | 36-Mo DB + Indexes | Recommended shared_buffers |
|---|---|---|---|
| 10,000 / mo | ~0.3 GB/yr | ~0.9 GB | 256 MB |
| 75,000 / mo | ~2.2 GB/yr | ~6.6 GB | 512 MB |
| 250,000 / mo | ~7.3 GB/yr | ~22.0 GB | 1,024 MB |