I am working on optimizing the import process of large OSM extracts into Postgres. I am currently using a Europe extract as pbf (from Geofabrik) and I have a process that has been running for over 4 days that writes the import files for Postgres. I am relying on the pgsnapshot schema so from what I read using another tool than osmosis is not possible. However, I am looking for any recommendations on how to speed up this process. The command that I am using is:
osmosis -v --read-pbf-fast file="europe-latest.osm.pbf" --used-node --write-pgsql-dump enableBboxBuilder=yes enableLinestringBuilder=yes directory=/home keepInvalidWays=no
I have tried using the --buffer option but that didn't help. Considering hardware I have flexible options since I am working with servers managed by GCP but at the moment the machine is configured with 4 vCPUs, 16GB memory and 1TB disk.