osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

osrm-partition hangs or fails silently on large extract (25GB RAM, 6-core system)

Open janvi-tapfin opened this issue 6 months ago • 1 comments

I'm trying to run osrm-partition on an OSM extract of India using the latest osrm/osrm-backend Docker image. I successfully completed the osrm-extract step, but the partition step either hangs indefinitely or fails silently.

System resources:

RAM: 25GB available

Cores: 6 (confirmed via nproc)

Docker: yes (using osrm/osrm-backend:latest)

Dataset: india-latest.osm.pbf (from Geofabrik)

The script I am using

#!/bin/bash

set -e # Exit on any error

OSRM_FILE="india-latest.osrm"

echo "🧩 Step 1: Partitioning the data..." sudo docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-partition /data/$OSRM_FILE echo "✅ Step 1: Partition completed."

echo "⚙️ Step 2: Customizing the data..." sudo docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-customize /data/$OSRM_FILE echo "✅ Step 2: Customize completed."

echo "🚀 Step 3: Starting OSRM routing server..." sudo docker run -d -p 5000:5000 --rm --name osrm -v "${PWD}:/data" osrm/osrm-backend osrm-routed --algorithm mld /data/$OSRM_FILE echo "✅ Step 3: OSRM server is now running on http://localhost:5000"

The extraction step is completed but partition fails

Image

janvi-tapfin avatar Jun 27 '25 04:06 janvi-tapfin

May I know the file size, specifically for the .osm.pbf file that you're using? From experience, the extraction and partition steps typically require around 3 to 5 times the file size in available RAM, especially for large datasets like India.

D-KOD3R avatar Jul 08 '25 11:07 D-KOD3R