1

I have built my own OSM server and I am trying now to import UK into my Postgis database using osm2pgsql. I have changed the data directory of the database (succesfully) and I have mounted a Samsung 850 EVO SSD on it. The issue is, I do not see any speed increase when using SSD compared to a normal import using HDD. Osm2pgsql configuration is like this:

osm2pgsql -d gis --create --slim  -G --hstore --tag-transform-script openstreetmap-carto.lua -C 3500 --number-processes 1 -S carto.style UK.osm.pbf

(Working in a Ubuntu 16.04 virtual machine of 5GB RAM)

Nodes and ways are being imported at a speed of 80 k/s and 0.10 k/s in average in both cases, respectively. Any idea about what could be happening?

*I am 99% sure I am importing into the SSD device as when I import a smaller region its free size decreases.

  • 1
    5Gb is a tiny chunk of RAM for a database server 12-24 would be more appropriate. But then you'd need to configure the database to use it. There are probably dozens of bottlenecks in your configuration, but disk speed isn't the critical one. This topic is probably better researched over in Database Administrators – Vince Jul 28 '17 at 7:49
  • Thanks for your response. What configuration are you referring to? Postgres's database, Osm2pgsql tags, VMWare...? – I.Mmense Jul 28 '17 at 8:02
  • Most calculation processes are bound to a single thread and therefore won´t gain advantage of higher diskspeed as your processor is your bottleneck probably. Check if top tells you max usage for a single thread /virtual core. Only if the processor is not at 100% it makes a difference. – Matte Jul 28 '17 at 10:13
  • You can try to set the --number-processses to more than one(max should be number of your virtual / hyperthreading cpu-cores or the number you set in your VM) to try to use more of your processor. – Matte Jul 28 '17 at 10:20
  • You both are right, thank you, CPU is the limitator (100% usage)...BUT, when I set VM for working with 8 processors (as pc has 4 dual-core processors) and set --number-processors 8, nodes are still being imported at a speed of 70-90 k/s, and, CPU usage is same as before (osm2pgsql and postgres take almost 100% of CPU). – I.Mmense Jul 28 '17 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.