[postgis-users] Re: [mapserver-users] MapServer Performance

Vinko Vrsalovic vinko at cprsig.cl
Thu Nov 21 21:59:21 PST 2002


On Thu, Nov 21, 2002 at 02:35:58PM -0500, Ed McNierney wrote:
> Folks -
> 
> I have been very pleased with MapServer performance on a variety of applications.  Good data design is also a very important part of any application.
> 
> I have never done head-to-head comparisons with ArcIMS, because I could not afford a copy of ArcIMS.  If anyone has a SPECIFIC project in mind, I'd be happy to help with performance tuning.  There are far too many parameters possible to spend time on a "here's how to totally optimize every conceivable MapServer app on any hardware you like"....
> 

Well, I'm finishing a PostGIS/PHPMapScript app which classifies data
dinamically from a set of on the fly parameters obtained by user input.

It's working quite fine functionally speaking, and just came to the
performance issue. The box that's running the app is a PIII 1.3 Ghz, 1
GB Ram, UW160 SCSI disks. This box runs Apache, PostgreSQL, PostGIS and
PHPMapScript.

To render a 'normal' view of the map it's lightning fast. But when
showing a classified (in the 'adding classes' sense) view it takes on
that box like a second or a bit more in finishing the calculations, and
that seems to be a bit slow, given the machine specs and that's under a
one user only load (I still haven't done a full profiling of the app,
but top shows postmaster eating up to 73% of the CPU during that second).

The way I'm doing it is:

1.- I first obtain the data (reading from a file) from which the set of 
features will be classified.
2.- Then I add a column to that table to hold the data for that
classification and request (so that multiple requests can be handled at
the same time).
3.- Then I update that column of the PostGIS table to hold the data for that
particular classification from the data obtained in step 1.
4.- Then I add the layers with PHPMapscript using expressions (something
like: ([DATA_USER] >= $class[$i] AND [DATA_USER] < $class[$i+1]) ) to the mapObj.
5.- Then I draw the map.

I guess the difference in performance comes from the indexes done to the
tables, because for 'static' rendering indexes are useful, but that data
column varies from request to request, so indexes will not be useful...

Any hints or suggestions?

(BTW, now it should be clear why I wanted the possibility to create
layers from views)

-- 
Vinko Vrsalovic <el[|- at -|]vinko.cl>
http://www.cprsig.cl



More information about the postgis-users mailing list