Nominatim very slow to import Brazil data

Hello everyone,

I am implementing nominatim on a dedicated server.

Here is the information:
Nominatim 4.2.0
psql (PostgreSQL) 14.13 (Ubuntu 14.13-1.pgdg20.04+1)
OS: Ubuntu 20.04.6 LTS x86_64
CPU: AMD EPYC 7742 (16) @ 2.245GHz
Memory: 32Gb

Postgress settings:
shared_buffers = 8GB
effective_cache_size = 24GB
maintenance_work_mem = 2GB
work_mem = 64MB

max_worker_processes = 16
max_parallel_workers_per_gather = 8
max_parallel_workers = 16

max_wal_size = 4GB
wal_buffers = 16MB
wal_sync_method = fsync
random_page_cost = 1.1
autovacuum_vacuum_scale_factor = 0.1
autovacuum_analyze_scale_factor = 0.05

I’m importing the map of Brazil, and I feel like it’s taking longer than it should
(the documentation says that importing the planet would take about 5 days with 128gb of ram)
And in my case, a 1.7gb file is expected to take the same amount of time (this is only at rank 26)

2024-10-24 20:10:02: Done 30489 in 6673 @ 4.569 per second - rank 26 ETA (seconds): 1153346.92 (almost 14 days).

What can I check to make the process faster? (I’ve tried with 16 cores and 64gb, the estimated time was the same)

I could see that during the log, the ‘per second’ gradually decreases, so the ETA only increases.

Thanks to everyone who can help me

Hello,
You can update your Postgis, Ionvia (one of the Nominatim developers) talked about it in the end of this page below (green marked message). Try to use Pistgis v. 4.3 or 4.4.

https://github.com/osm-search/Nominatim/discussions/3395

Another step may be to change the autovacuumm* settings, as this may also decrease its performance.

Good luck and let me know if you managed to fix it!

Raquel (from Rio de Janeiro, Brazil)
IVIDES.org | IVIDES DATA

1 Like

Hello, I managed to solve it by simply updating the version of everything.

I upgraded to Ubuntu 24.04, Nominatim 4.5 and Postgres 17.

It became extremely faster.

Anyway, thanks for the help.

(ps: tambem sou do Brasil :smile: )