NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I have my own OSM tile server that I set up following the instructions (with local changes) on switch2osm here: https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/

It's hosted on "the cloud", including using an iSCSI drive for the data. Recently, a network error caused the disk to crash. Luckily, we could save it, but the server was down for a day. Now I am looking to improve the situation to provide better service in 2 respects:

  1. Reduced risk of long downtime
  2. Better performance

As you can imagine, the performance for creating tiles is not great. Sometimes it takes HOURS. We also want to start using the tile server in production and cannot reasonably allow days of downtime.

Are there any reference setups, best practices, etc.? Anyone want to share their hardware configuration?

We have thought of a few options:

  1. Upgrading the server to use local SSD storage. Provide backup/restore mechanism that would have downtime of a few hours in case of hard disk or server crash.
  2. Similar to above but with 2 load balanced servers. This would be twice as expensive but would reduce downtime significantly
  3. Provide RAID on the local hard disks. I'm not sure this pays for itself. Am I wrong?
  4. Keep a low performance, low reliability tile server, but put a cache server (or several) in front of it. Precompute all of the tiles. Should the tile server die, the cache server would continue serving tiles until the tile server could be rebuilt (which takes weeks).

Any and all opinions, recommendations, and details would be welcome!

Thanks, Harold Ship

asked 23 Jul '15, 16:13

haroldship1's gravatar image

haroldship1
26113
accept rate: 0%

edited 23 Jul '15, 16:16


Local SSD is a must. You haven't said if you're running a world-wide server or just a regional one. Precomputing all tiles world-wide is not feasible. You'd usually pre-compute z0-12 or 0-13 and then render the rest on-demand. Having multiple identical servers helps against server failure, but you might also get away with having a "clone" of the main server that keeps only the rendering database and not the update tables, so if the main server fails the clone can at least produce tiles, just not update them.

permanent link

answered 23 Jul '15, 16:57

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

1

And iSCSI is just a terrible idea for both performance and reliability. Do not use iSCSI unless you can be very lax on both those criterias, or unless you're using software that is specifically tailored for this kind of hardware (Postgresql isn't).

I ignored that warning once and we paid that with cripling downtimes and limiting performance. We'll be glad when those servers get decomissioned this year.

(24 Jul '15, 10:50) Vincent de P... ♦

Ok I will push for the SSD. When you say it's a must, do you mean for the DB or also for the tiles cache?

(26 Jul '15, 05:28) haroldship1

Yes, we are trying to run the whole world, so precomputing up to say level 13 might be what we'll do. I guess if/once we have SSD we can re-evaluate the performance.

(26 Jul '15, 05:29) haroldship1

Well, what happened for us was a network switch died and corrupted our iSCSI volume. So I guess I am also learning the hard way. Luckily fsck recovered it.

(26 Jul '15, 05:31) haroldship1

Well, this doesn't seem to be an FAQ about OSM, but a need for server experts.

Have a look at Commercial_OSM_Software_and_Services for instant advices.

After own internet seraching I only found:

http://www.geofabrik.de/media/2012-09-08-osm2pgsql-performance.pdf

Some server hardware stuff is mentioned there.

Asking the guys from geofabrik directly about your aim cannot be bad.

permanent link

answered 23 Jul '15, 16:30

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

Thank you I'll use this to negotiate with the IT department.

(26 Jul '15, 05:32) haroldship1

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×440
×204
×28
×2

question asked: 23 Jul '15, 16:13

question was seen: 7,079 times

last updated: 26 Jul '15, 05:32

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum