<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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 <a href="http://..../tile.php">http://..../tile.php</a>?...” 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.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So, we kick off a batch file containing the multitude of tile requests, and that still takes too long.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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<sup>th</sup> of the time for me to not think that we’ve got a bottleneck, somewhere, and there’s no parallelism happening.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>