[OSM-dev] Multithreading in new version of osmosis

Sanjay B b at pad.ma
Thu Oct 4 10:59:47 UTC 2018


Again, please let me know if there's a better place to ask osmosis 
specific questions :-)

I have managed to successfully build and run the latest (v0.47) version 
of osmosis on Github: https://github.com/openstreetmap/osmosis

I am trying to run a task that reads a PBF file and populates the 
`apidb` schema. Earlier, when running the same command, I'd see osmosis 
using all CPU cores on my machine, running multiple processes. However, 
now I see only one `java` process running.

The command I'm running looks like:

`./osmosis --read-pbf file=~//pbf/monaco.pbf --write-apidb 
database=openstreetmap host=127.0.0.1 user=osm password=pwd 
validateSchemaVersion=no`

This works fine and data is imported, except that it seems to be running 
only one thread, and I worry this would result in significantly slower 
imports of larger data-sets.

I see this commit from April 2018 that might be (?) related to this: 
https://github.com/openstreetmap/osmosis/commit/c438e9ddf64c4dff2dcc80191c95a453e3c067fc

Is there an option one can pass to force the older behaviour with 
regards to multithreading? I was unable to find it in the docs - I tried 
playing around with the `--buffer` parameter, but it did not seem to help.

Of course, I understand this version isn't properly "released" yet and 
docs could be in flux, am super happy to play the role of tester here. 
And of course, it's entirely possible I'm missing something obvious 
(like my previous question here).

Thank you again for any help!
-Sanjay




More information about the dev mailing list