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

Trying to Serve Tiles for North America [Help Needed -- First Time Setup] #432

Open
TopHatProductions115new opened this issue Aug 28, 2024 · 0 comments

Comments

@TopHatProductions115new
Copy link

TopHatProductions115new commented Aug 28, 2024

I'm trying to serve tiles for the North America region (~15GB OSM PBF). My setup is an Arch-based VM, with the the openstreetmap-tile-server container running on Docker Compose. Here are the specs for the VM:

  • 16 vCPU(s) :: Intel Xeon E7-8870
  • 128GB RAM :: DDR3 ECC
  • 8TB storage :: HGST SAS HDD

I've been searching for info on benchmarks and expected performance (especially for the initial import command). Something tells me that I'm not going about this correctly. I saw at least one source state that running this on HDDs, instead of SSDs, could make the process take days, in opposed to hours. Furthermore, I'm currently running on Xeons from mid-2011.

Given the potentially sub-optimal setup, I would still like some pointers on how I can improve performance for this instance. My current compose file is included, for your review/feedback:

# Compose file draft, created with instruction from:
# https://github.com/Overv/openstreetmap-tile-server
# https://github.com/Overv/openstreetmap-tile-server/blob/master/docker-compose.yml
# https://github.com/Overv/openstreetmap-tile-server/issues/22#issuecomment-493975963
# https://github.com/Overv/openstreetmap-tile-server/issues/72#issuecomment-538284128

version: "3"

services:

    osm-tile-server:
        image: overv/openstreetmap-tile-server:latest
        container_name: osm-tile-server
        hostname: osm-tile-server
        restart: always
    # First, import the OSM PBF file into the PostgreSQL database
    #   command: "import"
    # Then, run the tile server to serve the processed tiles
    #   command: "run"
        volumes:
            - /path/to/OSM/tileserver/downloads/north-america-latest.osm.pbf:/data/region.osm.pbf
            - /path/to/OSM/tileserver/database:/data/database
            - /path/to/OSM/tileserver/tiles:/data/tiles
        ports:
            - REAL_PORT_NUMBER:80
        environment:
            UPDATES: "disabled"
            THREADS: 8
            FLAT_NODES: "enabled"
            ALLOW_CORS: enabled
            OSM2PGSQL_EXTRA_ARGS: "-C 4096"
        # The next 2 variables should be unnecessary if you already run OSRM
        #   DOWNLOAD_PBF: "https://download.geofabrik.de/north-america-latest.osm.pbf"
        # The next variable only applies if you allow for automatic updates
        #   DOWNLOAD_POLY: "https://download.geofabrik.de/north-america.poly"
    # It is a docker-compose specific service option
        shm-size: 256M
        networks:
            docker_files_Docker_Ten:
                ipv4_address: a.local.IP.address


networks:
    docker_files_Docker_Ten:
        external: true

Please note that I do have a hardware upgrade planned for the future. However I still would like to (attempt to) optimize things beforehand.

@TopHatProductions115new TopHatProductions115new changed the title Trying to Serve Tiles for North America Trying to Serve Tiles for North America [Help Needed -- First Time Setup] Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant