Skip to content

Commit

Permalink
Merge pull request #216 from rustprooflabs/dev
Browse files Browse the repository at this point in the history
Enforce osm2pgsql minimum RAM
  • Loading branch information
rustprooflabs authored Dec 6, 2021
2 parents ceafd9a + b47c33d commit 4428905
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ CURRENT_GID := $(shell id -g)
TODAY := $(shell date +'%Y-%m-%d')
INPUT_FILE_NAME=custom_source_file.osm.pbf
REGION_FILE_NAME=region-dc
RAM=2

# The docker-exec-default and unit-test targets run last
# to make unit test results visible at the end.
Expand Down Expand Up @@ -66,7 +67,7 @@ docker-exec-default: build-run-docker
-u $(CURRENT_UID):$(CURRENT_GID) \
pgosm python3 docker/pgosm_flex.py \
--layerset=default \
--ram=1 \
--ram=$(RAM) \
--region=north-america/us \
--subregion=district-of-columbia

Expand All @@ -93,7 +94,7 @@ docker-exec-input-file: build-run-docker
-u $(CURRENT_UID):$(CURRENT_GID) \
pgosm python3 docker/pgosm_flex.py \
--layerset=default \
--ram=1 \
--ram=$(RAM) \
--input-file=/app/output/$(INPUT_FILE_NAME)


Expand Down Expand Up @@ -122,7 +123,7 @@ docker-exec-region: build-run-docker
-u $(CURRENT_UID):$(CURRENT_GID) \
pgosm python3 docker/pgosm_flex.py \
--layerset=default \
--ram=1 \
--ram=$(RAM) \
--region=$(REGION_FILE_NAME)


Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ Minimum versions supported:
* PostGIS 3.0
* osm2pgsql 1.5.0

## Minimum Hardware

osm2pgsql requires [at least 2 GB RAM](https://osm2pgsql.org/doc/manual.html#main-memory).
Fast SSD drives are strongly recommended.


## PgOSM via Docker

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
click>=8.0.1
coverage>=6.1.2
osm2pgsql-tuner==0.0.3
osm2pgsql-tuner==0.0.4
psycopg>=3.0.3
psycopg-binary>=3.0.3
sh>=1.14.2

0 comments on commit 4428905

Please sign in to comment.