[ka-Map-users] KaMap performance tuning

Jeff Dege jdege at korterra.com
Mon May 21 15:25:24 EDT 2007


We've been using KaMap with Mapserver and OpenLayers, with some success.
We've recently begin looking at using PostGIS instead of shapefiles,
hoping to getter performance when generating maps that haven't yet been
tiled.

So we loaded our shapefiles into PostGIS tables, and created a new map
file that was a copy of the first, except that it got its map data from
the PostGIS tables.

Our first comparison was using shp2img, which showed a dramatic decrease
in the time needed to generate maps - with our data, PostGIS was eight
to ten times faster.

So we cleared out our tile cache, pointed KaMap at the PostGIS map file,
and saw very little difference.

So we created a batch file that would download a thousand different
tiles, using wget to make direct calls against tile.php, and timed how
long it took to run, with the shapefile and the PostGIS map files.  The
PostGIS test was only five percent that the shapefile test.

So we created yet another batch file that used wget to make direct calls
against mapserver.exe, running in CGI mode.  When generating maps from
PostGIS data, mapserver was eight times faster than against shapefiles.

So now the question:  If the image creation is so much faster, when
accessed through shp2img, and when accessed through mapserver.exe, why
is that speed improvement not visible when loading tiles through kamap's
tile.php?

It's clear to me that there must be some bottleneck, reducing
performance.  My guess would be in Apache or PHP configuration.

Does anyone know how I can measure what time is being spent doing what,
in this area?  What configuration options I should look at, to try to
improve performance?

Thanks.




More information about the ka-Map-users mailing list