[MS4W-Users] Parallelism in KaMap - an Apache and Php/Mapscript configuration question

Jeff Dege jeff.dege at korterra.com
Fri Oct 29 09:19:41 EST 2010

We have a legacy application that depends on a map served by KaMap - which is a php module that serves cached map tiles, and which uses MapServer's  to create the tiles.

We're using KaMap, instead of MapServer directly, because MapServer is too slow in serving tiles on its own, running on Windows, with the shapefiles we've been given.  And, of course, the customer refuses to allow us to host MapServer on Unix, and we can't restructure the shapefiles.

Actually, even using KaMap, the tile generation is too slow, so to get acceptable performance we need to precache the tiles.  We have a program that generates a series of "wget http://..../tile.php?..." calls, each of which hits the php app on the Apache webserver, asking for a particular tile.  Php checks its disk cache, and if the tile exists, it returns it.  If not, it makes a call to mapscript to generate the image, saves it in its disk cache, and returns the generated image.

So, we kick off a batch file containing the multitude of tile requests, and that still takes too long.

My last attempt involved splitting the batch file into six smaller batch files, and running them simultaneously.  I expected that simultaneous hits against the web server would result in multiple worker processes, with multiple instances of PHP, and multiple instances of MapServer, running in parallel.  What I got suggested that wasn't true.

Running the six batch files simultaneously took 37 hours to complete.  Running just one of them took a bit over seven hours.  That's way too close to 1/6th of the time for me to not think that we've got a bottleneck, somewhere, and there's no parallelism happening.

So, my question, in an MS4W installation of Apache, Php, and MapServer/MapScript, is there some configuration setting I can change to allow for the parallelism I'd expect to happen?  Is it Apache that's blocking simultaneous access? Php?  Or MapScript?  Is there anything I can do to get simultaneous calls to tile.php to process in parallel?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20101029/09fb5637/attachment.htm 

More information about the MS4W-Users mailing list