Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The configuration of "nominatim import" can not transfer to osm2pgsql.osm2pgsql execut slow. #532

Closed
StSahana opened this issue Feb 27, 2024 · 2 comments
Labels

Comments

@StSahana
Copy link

I runing the container with

docker run -it \
-e PBF_PATH=/data/china.osm.pbf \
-e NOMINATIM_PASSWORD=qaIACxO6wMR3 \
-e PROJECT_DIR=/nominatim \
-e USER_AGENT=mediagis/nominatim-docker:4.3.2 \
-e REVERSE_ONLY=true \
-e IMPORT_STYLE=address \
-e THREADS=30 \
-e shm-size=32G \
-e POSTGRES_SHARED_BUFFERS=4GB \
-v nominatim-flatnode-china:/nominatim/flatnode \
-v nominatim-data-china:/var/lib/postgresql/14/main \
-v /root/upload/china.osm.pbf:/data/china.osm.pbf \
--name=nomi_china \
--workdir=/app -p 5434:5432 -p 8084:8080 --runtime=runc -d mediagis/nominatim:4.3-2024-02-21T17-21

In conatainer,it shows

python3 /usr/local/bin/nominatim import --osm-file /data/china.osm.pbf --threads 30 --reverse-only
/usr/local/lib/nominatim/osm2pgsql --hstore --latlon --slim --log-progress true --number-processes 1 --cache 0 --style /usr/local/etc/nominatim/import-address.lua --output flex --create --flat-nodes /nominatim/flatnode/flatnode.file /data/china.osm.pbf

Why can't the THREADS parameter be passed to osm2pgsql?
Thx

@StSahana StSahana added the bug label Feb 27, 2024
@mtmail
Copy link
Contributor

mtmail commented Feb 27, 2024

osm2pgsql software is single-threaded. It connects node to ways and ways to relations. That logic can't run in parallel.

@StSahana
Copy link
Author

Get it.Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants