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, 11:28

antoniodelapradera's gravatar image

antoniodelap...
112
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: https://wiki.openstreetmap.org/wiki/Osm2pgsql/benchmarks#Desktop_Debian_9.2C_4_cores_i5-6500_CPU_.40_3.20GHz.2F32GB_RAM.2C_1TB.2B500GB_SSD_.28hstore_slim_drop_flat-nodes_and_ZFS_filesystem.29 with your hardware you should perform better than 45hrs.

permanent link

answered 08 Mar, 11:36

Spiekerooger's gravatar image

Spiekerooger
1.4k1327
accept rate: 17%

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 openstreetmap-carto.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, 13:32) antoniodelap...

I was checking this: https://wiki.openstreetmap.org/wiki/Osm2pgsql/benchmarks But I will check that one for sure.

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

(09 Mar, 11:37) antoniodelap...
Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×239
×180
×96

question asked: 08 Mar, 11:28

question was seen: 178 times

last updated: 09 Mar, 11:37

powered by OSQA