3
1

Hello Everybody,

i try to Create my Own Tileserver.

But it is soooo slow.

Therefore i use render_list to pre_render Tiles.

But why is it so Slow?! And only 740 MB of 5,4 GB are used (13 %)

I am running it on a VM. If i only use it for Belgium / one County -> it is fast.

But Hole Europe -> Slow

How can i improve the Performance? Please dont tell me use more RAM. You can tell me if there is no more Free RAM left. Ore a better CPU (4 Core, every usage unter 15 %)

Thanks!

asked 27 Apr '13, 09:05

asmardemir's gravatar image

asmardemir
616610
accept rate: 0%

edited 27 Apr '13, 18:29

aseerel4c26's gravatar image

aseerel4c26 ♦
32.2k16239552


2 Answers:
8

The slow part is usually database access. Whereas Belgium is small and therefore fast to access the data, the whole of Europe is already a very substantial amount of data. At low zoom it simply takes a lot of seeks to retrieve the data out of the database.

Actually I will tell you to use more RAM... ;-) Postgresql heavily relies on the operating system disk cache to get acceptable performance, unlike other databases that use their own cache. As such the ram use for the os level disk cache does not get attributed to any application looks free. However, the OS will use all available (usefully) RAM for disk caching. For the whole of Europe, 5.4GB RAM is doable, but you should definitely see some substantial performance increases if you increase it to 16GB or more.

Alternatively switching from conventional harddisks to SSDs helps a lot in rendering performance, as the bottleneck is usually seek performance of the harddisk for database access.

However, it is predominantly the low-zoom tiles that take long to render. Zoom levels 7, 8 and 9 are probably the slowest to render per tile. After about Z12 it gets substantially faster, continously decreasing per tile rendering time until you reach Z18. As there are only very few low zoom tiles, however, it isn't as critical that low zoom tiles are slow.

After a couple of hours of pre-rendering, you should have them (low zoom tiles) all cached and you don't need to render them again.

permanent link

answered 27 Apr '13, 17:41

apmon's gravatar image

apmon
6.3k184456
accept rate: 20%

Okey, i will try.

But a little Question:

Is it possible to "split" the Data in different Tables / Different Databases?

(29 Apr '13, 00:13) asmardemir
1

Not currently. Or at least not with osm2pgsql.

As there are usually only a few long running queries, it is possible to add some additional indexes, specifically designed for those queries which potentially speed up low zoom rendering.

(29 Apr '13, 10:30) apmon
1

Hi

This video may help you in answering your question

https://www.youtube.com/watch?v=Lxloo42gl8A

[osm2pgsql:mapnik — Optimizing the Rendering Toolchain - Paul Norman]

and this pdf

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

permanent link

answered 01 Oct '17, 13:36

jason1975's gravatar image

jason1975
262
accept rate: 0%

edited 02 Oct '17, 14:23

Richard's gravatar image

Richard ♦
28.5k40253383

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:

×396
×175
×30
×26
×2

question asked: 27 Apr '13, 09:05

question was seen: 7,846 times

last updated: 02 Oct '17, 14:23

powered by OSQA