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

Julien-Samuel Lacroix jlacroix at mapgears.com
Mon Nov 1 11:20:05 EST 2010


We did something similar, but on a Linux server. The only thing from 
your setup that seems different from ours (apart from the Windows OS), 
is that you call Apache. In our setup, we called the the precache script 
directly from the command line and we were not going through Apache at 
all. In the end that was the easiest way to do parallelism and it worked 
like a charm.

I'm not sure that's the source of your problem, but removing the Apache 
layer will probably help.

Hope that helps,

On 10-10-29 10:19 AM, Jeff Dege wrote:
> 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/6^th 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?
> Thanks.
> _______________________________________________
> MS4W-Users mailing list
> MS4W-Users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ms4w-users

Julien-Samuel Lacroix

More information about the MS4W-Users mailing list