[Tilecache] Speedup things

Tyler Durden tylersticky at gmail.com
Tue Oct 21 07:39:18 EDT 2008


My osm is quite complex.
My question is that if this times are acceptable.

I'm using WGS84 not projected in Postgresql and my tilecache.cfg is
something like:

[main]
type=MapnikLayer
mapfile=/home/maps/maps/tilecache/osm.xml
projection=+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0
+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over
bbox=-20037508,-20037508,20037508,20037508
maxResolution=2000
srs=EPSG:4326
levels=12
extension=png
size=256,256
metaTile=yes
metaBuffer=2048
debug=no

I have an osm.xml that includes several layers:

<xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map[
  ...
  <!ENTITY countries SYSTEM "styles/countries.xml">
  <!ENTITY altimetry SYSTEM "styles/altimetry.xml">
  <!ENTITY buildups SYSTEM "styles/buildups.xml">
  <!ENTITY gardens SYSTEM "styles/gardens.xml">
  <!ENTITY airports SYSTEM "styles/airports.xml">
  <!ENTITY buildings SYSTEM "styles/buildings.xml">
  <!ENTITY water SYSTEM "styles/water.xml">
  <!ENTITY railroads SYSTEM "styles/railroads.xml">
  <!ENTITY districts SYSTEM "styles/districts.xml">	
  <!ENTITY streets SYSTEM "styles/streets.xml">
  <!ENTITY streets_major SYSTEM "styles/streets_major.xml">	
  <!ENTITY streets_major_shields SYSTEM "styles/streets_major_shields.xml">
  <!ENTITY settlements SYSTEM "styles/settlements.xml">
]>
...

On Tue, Oct 21, 2008 at 12:22 PM, Christopher Schmidt
<crschmidt at metacarta.com> wrote:
> On Tue, Oct 21, 2008 at 11:05:36AM +0100, Tyler Durden wrote:
>> Hi,
>> I'm using Postgres(8.2 with Postgis), TileCache(2.04) + Mapnik(0.5.1)
>> and tilecache_seed.py to generate the tiles.
>> The problem is that is slow(or think it is).
>> The machine has 2Gb RAM an Intel Quad Core 2.4.
>
> How complex is your Mapnik XML file? I expect that this time is all
> spent in mapnik. These tile rendering times don't seem odd at all to me
> from my experience with Mapnik.
>
> Are you using the osm.xml that OpenStreetMap uses? If so, then this
> isn't surprising at all to me... though having so many tiles on level 3
> kind of is, so I assume you're not using the standard spherical mercator
> 20 zoom levels projection?
>
>> In postgresql.conf:
>> shared_buffers = 128MB
>> work_mem = 32MB
>> effective_cache_size = 1024MB
>>
>> Output from tilecache_seed.py:
>> ...
>> 03 (000435, 000310) = (7802492.0000 -197508.0000 7866492.0000
>> -133508.0000) [5.0868s : 4.386/s] 7900/15876
>> 03 (000440, 000310) = (8122492.0000 -197508.0000 8186492.0000
>> -133508.0000) [5.1092s : 4.379/s] 7901/15876
>> 03 (000445, 000310) = (8442492.0000 -197508.0000 8506492.0000
>> -133508.0000) [5.0622s : 4.372/s] 7902/15876
>> 03 (000450, 000310) = (8762492.0000 -197508.0000 8826492.0000
>> -133508.0000) [4.6159s : 4.366/s] 7903/15876
>> 03 (000455, 000310) = (9082492.0000 -197508.0000 9146492.0000
>> -133508.0000) [4.6226s : 4.360/s] 7904/15876
>> 03 (000460, 000310) = (9402492.0000 -197508.0000 9466492.0000
>> -133508.0000) [4.6238s : 4.353/s] 7905/15876
>> 03 (000465, 000310) = (9722492.0000 -197508.0000 9786492.0000
>> -133508.0000) [4.6130s : 4.347/s] 7906/15876
>> ...
>>
>> The streets layer has 900.000 rows. The rest of layers are between
>> 10.000 and 80.000 rows.
>> I have created the indexes in the geometry fields and in the where(sql) fields.
>> Any tips to speedup things?
>>
>> Thanks,
>> Tyler
>> _______________________________________________
>> Tilecache mailing list
>> Tilecache at openlayers.org
>> http://openlayers.org/mailman/listinfo/tilecache
>
> --
> Christopher Schmidt
> MetaCarta
>



More information about the Tilecache mailing list