[mapserver-users] Faster MapServer Stand-Alone?
Daniel Morissette
morissette at dmsolutions.ca
Thu Sep 6 07:40:52 PDT 2001
Frederik Ramm wrote:
>
> Hi,
>
> I've been looking at using the MapServer for a project of mine
> in which I have to create map images with minimal delay.
>
> Please correct me if I'm wrong but I got the impression that,
> basically, the MapServer will always run as a CGI. That means that for
> each request it will not only start a new process but also open and
> parse the map and all shape files. Then, it creates an output file
> which will be read by the web server in order to pass it on to the
> client.
>
Frederik,
As someone else pointed in another message, most of the time is spent in
accessing the map data and the overhead of loading the CGI is minimal
relative to the time of accessing the map data and rendering them. Note
that using "mode=map" you can already return a map directly to stdout
and avoid the temporary GIF file creation if that's a concern to you...
but since you need to produce an HTML response plus some GIF images in
the same request, saving to a temporary GIF is what causes the less
overhead.
Proper use of quadtree indexes and tile indexes is the first thing you
should concentrate on when tuning your applications. Loading all
shapefiles in RAM might improve performance, but only if your dataset is
smaller than your available RAM... it might be an interesting option to
look into (maybe a new CONNECTIONTYPE RAM ? ;), but that won't replace
good use of quadtrees and tile indexes when you deal with gigabytes of
data.
Back to your original question: I think what you need is FastCGI... it
would run under the regular Apache (so you don't ned to write your own
server), but would save the overhead of loading the CGI and you could
even preload the mapfile pretty easily and even preload the tile indexes
for instance (with some work).
There have been discussions on using MapServer under FastCGI about a
year ago but we haven't heard anything since then. I think your efforts
would be better spent in making MapServer FastCGI-friendly than in
writing a custom server... and we might even be interested in helping
with such a project.
BTW, is anyone running MapServer with FastCGI at the moment? Or did
anyone try it recently?
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
Don't put for tomorrow what you can do today, because if
you enjoy it today you can do it again tomorrow.
More information about the MapServer-users
mailing list