NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi there,

Just trying to build up a new tile server and can't figure out how to get best performance on it. Followed up the guide at switch2osm and it works but quite slow.

Imported the entire world map in 45h in a 64 Cores and 128GB RAM and 2TB SSD server, I expected to be much faster so probably I messed up with some importing option.

Wonder if someone could help me with best configuration hardware/software (osm2pgsql import, postgresql and renderd options).

asked 08 Mar '21, 11:28

antoniodelapradera's gravatar image

accept rate: 0%

Cores won't help that much as expected for import as some of the osm2pgsql work is done single-threaded. 45h for importing planet.osm.pbf may not be the best performance but not that bad either. Is this a single ssd? What's the write/sec. for that one? Did you adjust the postgresql conf settings? Are you using a flat nodes file? Which version of osm2pgsql are you using?

Comparing with e.g. this benchmark: with your hardware you should perform better than 45hrs.

permanent link

answered 08 Mar '21, 11:36

Spiekerooger's gravatar image

accept rate: 16%

The osm2pgsql version is 1.4.1 and here is the command I used for the import:

osm2pgsql \ --cache 32768 \ --number-processes 32 \ --hstore \ --multi-geometry \ --database gis \ --slim \ --drop \ --style \ --tag-transform-script openstreetmap-carto.lua \ planet.osm.pbf

And for the postgresql I only changed 3 values:

work_mem=1GB maintenance_work_mem=4GB shared_buffers=32GB

I do not know if tunning any other option in the db would be better.

(08 Mar '21, 13:32) antoniodelap...

I was checking this: But I will check that one for sure.

Do you think I should use --flat-nodes option while importing?

(09 Mar '21, 11:37) antoniodelap...

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 08 Mar '21, 11:28

question was seen: 2,639 times

last updated: 09 Mar '21, 11:37

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum