Skip to content
Go back

Nominatim Hardware Sizing

By SumGuy 10 min read
Nominatim Hardware Sizing

The Question Everyone Asks Wrong

“What hardware do I need for Nominatim?”

The honest answer is “it depends entirely on which extract you import and how much patience you have.” But that’s not satisfying, so people shrug and either (a) try it on whatever box is sitting around, or (b) over-provision wildly and waste money.

Both are bad outcomes. The actual sizing math is not that hard once you separate the import from the runtime — they have totally different bottlenecks. Let’s get into the numbers so you can pick the right box without buying a server you don’t need.

This post assumes you’ve read the Nominatim install walkthrough, or at least know what the Compose stack looks like. We’re focused here on hardware, not setup.

The Two Phases That Have Nothing in Common

Nominatim has two distinct workloads, and they want different hardware:

  1. Import — runs once (per fresh data load). CPU-bound during parsing, disk-IO-bound during indexing, hungry for RAM and shared memory. Lasts hours to days.
  2. Runtime — query serving. Mostly disk-cache-bound, light on CPU, modest RAM. Lasts forever.

If you size for the import, you’ll waste a lot of resources during runtime. If you size for the runtime, the import will take a week. Most people end up biased toward the import side because the import is the painful, blocking experience that defines whether the project works at all.

The pragmatic compromise: pick a box that can do the import in 12–24 hours, then accept that it’s overkill at runtime. That’s fine. The runtime overhead of an underused server is rounding error.

Disk: The First Filter

Disk size is the easiest variable to plan for. It’s a hard floor — if you don’t have the bytes, the import fails.

Rough numbers for the imported database, with IMPORT_STYLE: full and the flatnode file enabled:

ExtractCompressed PBFImported DB
Country (e.g., Germany, Italy)3–5 GB30–80 GB
Continent (e.g., North America, Europe)10–25 GB150–400 GB
Planet (full OSM)~80 GB700–1000 GB

Add 20% headroom for growth from replication updates and Postgres bloat over time. Then add the OS and Docker overhead — call it 20 GB for a clean Linux install plus the mediagis image plus its caches.

Practical sizes:

Disk speed matters at least as much as disk size. A SATA SSD will work but will turn a 12-hour import into a 30-hour one. Spinning rust is borderline unusable for the import — you can do it, but expect days. NVMe is the right answer if you can.

RAM: The Sneaky One

RAM requirements split between import and runtime.

For the import, Nominatim wants enough RAM to fit the working set of Postgres sorts and indexes. The mediagis image defaults expect at least 8 GB; for a country extract you can squeak by with that. For a continent, 16 GB is the practical floor. For the planet, 32 GB is the floor and 64 GB is the right answer if you want the import to finish in a reasonable timeframe.

There’s a flatnode file Nominatim uses to track raw nodes. For the planet, this file is around 75 GB and should be on the same fast disk, not crammed into RAM. mediagis sets this up correctly by default.

For runtime, you need much less. The actual query workload is mostly hitting hot indexes that Linux will cache from disk. 8 GB total system RAM is plenty for runtime even on a continent-scale import, because Postgres only really needs ~4 GB of buffer cache for typical query patterns. The kernel page cache does most of the work.

The pattern that bites people: import on a beefy temporary box (rented VPS, borrowed workstation), then move the data volume to a smaller permanent box for runtime. That’s actually a totally reasonable workflow if you’re trying to run on a Mini PC long-term.

CPU: Less Picky Than You’d Think

Nominatim’s import scales decently with CPU threads, up to a point. The THREADS env var controls how many parallel workers do the indexing. More threads = faster import, but with diminishing returns past 8 because Postgres serializes a lot of the work and disk IO becomes the bottleneck.

Sane CPU picks:

CPU at runtime is essentially nothing. A single Nominatim query takes a few milliseconds of CPU. You can saturate a modern Mini PC at runtime only if you’re hammering it with thousands of requests per second.

The big gotcha: thermal throttling on consumer hardware. Mini PCs and laptops with weak cooling will throttle hard during a 12-hour import. Watch your temperatures. If the box drops to 60% clock speed because the fan can’t keep up, your 12-hour import becomes a 24-hour import. A USB desk fan blowing on the case is not a joke.

Reference Builds: What Actually Works

A few concrete profiles people run successfully.

Profile A: The Mini PC, Single Country

This is the right answer for ~80% of self-hosters. You don’t need a continent if you only care about your own country.

Profile B: The Home Lab Workstation, Continent

This is the sweet spot for people who want continental coverage without going overboard.

Profile C: The Used Server, Planet

If you actually need the planet — and most people don’t — used enterprise gear is the most cost-effective path. A 5-year-old dual-Xeon with 128 GB and a couple of NVMe drives is often cheaper than a new mid-range desktop.

Profile D: The Don’t-Do-This-Trap

Honestly, you can technically pull off a single small country extract on a Pi. The import is painful (24+ hours for a small country) and the runtime is acceptable. But you’re better off spending the same money on a used Mini PC that imports in 4 hours and runs everything else you’d want too.

Network: The Forgotten Variable

Pulling the PBF takes time. Geofabrik publishes from EU mirrors at decent speeds, but:

If you have flaky internet, run the import on a box with a wired gigabit connection or download the PBF in advance and mount it into the container. The mediagis image accepts a local PBF path via PBF_PATH instead of PBF_URL.

Replication: Ongoing Cost

After the initial import, daily replication updates pull diffs from Geofabrik. These are tiny — usually single megabytes per day for a country, tens of MB for a continent. Disk growth is gradual: budget for ~10–20% data size growth per year if you keep replication running indefinitely.

Periodic vacuum and reindex helps keep the database lean. The mediagis image runs autovacuum by default, but if you’ve been running for a year you might want to do a manual VACUUM FULL during a maintenance window.

Practical Buying Guide

Cheapest viable build for “I want to play with Nominatim and learn”:

That’s a $300 build that runs Nominatim plus a half-dozen other home lab services without breaking a sweat.

If you want continental coverage, jump to a used SFF workstation or a tower with 32 GB RAM and a real NVMe. Plenty of refurbished Dell OptiPlex / HP EliteDesk options under $500 with the specs you want.

If you want the planet — really, do you? If yes, used 1U enterprise servers from eBay are the best dollar-per-spec, with the caveat that they’re loud and power-hungry. Otherwise rent a beefy VPS for the import only, then move the data volume to a smaller permanent box.

Things That Will Bite You

Wrapping Up

For 80% of people the right answer is a 16 GB Mini PC with a 1 TB NVMe and a country extract. For the next 15% it’s a 32 GB box and a continent. The 5% who need the planet should be using used enterprise gear and doing the math seriously.

The biggest single mistake I see: people sizing for the planet on consumer hardware because “it’s only 80 GB compressed.” It’s not 80 GB; it’s 700–1000 GB imported, and the import itself is a 1–3 day commitment that wants real RAM and real disk. If you don’t actually need the planet, don’t import it.

Pick the smallest extract that covers your needs. You can always import a bigger one later. That’s the whole strategy.


Share this post on:

Send a Webmention

Written about this post on your own site? Send a webmention and it'll show up above once verified.


Next Post
Boundary vs Teleport

Discussion

Powered by Garrul . Sign in with GitHub or Google, or post anonymously.

Related Posts