[mapserver-users] Using Fast CGI with MapServer toalleviate poor performance

John.Westwood at port.ac.uk John.Westwood at port.ac.uk
Mon Sep 22 21:05:55 EDT 2008


Hi Everybody,

I am attaching  a cut down version of my html, javascript and map files. On our server the EmbeddedMap.js lives in the OpenLayers directory and is used by gbhgis_openlayers.html.

The test address http://148.197.8.119/gbhgis_openlayers.html . This is just a test server so please don't tell the whole World about it! :)

There are four layers, 2 x raster (europe 1940s, WMS and MapServer) and 2 x vector / raster (Digital Chart of the World, WMS and MapServer) .

A problem with using the OpenLayers.MapServer method is that the (1) The raster colours are messed up and (2) Anti-aliasing is not being done on the vector layers. I don't know why this is.

Regards,

John Westwood


>>> Stephen Woodbridge <woodbri at swoodbridge.com> 18/09/08 9:08 PM >>>
John Westwood wrote:
> Hi Paul and other MapServer Gurus,
> 
> I have discovered a huge speed increase by using OpenLayers.MapServer
> (native) layers instead of OpenLayers.WMS layers. It is about ten
> times faster, I do not exaggerate. Why is WMS so slow? I have read
> that MapServer is a fast WMS server, have I done something wrong for
> it not to be?
> 
> What do you think could be the problem?

You might want to check that you are comparing apples and apples. I 
would expect WMS to be a little slower because there is some overhead to 
query the server before actually making the image request.

Do you have ratio set the same for both layers?
What versions of Mapserver and OpenLayers are you using?

Can you post a URL that has the two layers present in the layer switch 
so we can look at the requests and how your have it configured? Or post 
the HTML so we can look at. In fact you might want to post the HTML to 
the openlayers list and as the question there first, to make sure you 
have equivalent requests between WNS and Mapserver.

-Steve W

> I will give it some thought tomorrow.
> 
> John
> 
> 
> 
> 
>>>> "Paul Ramsey" <pramsey at cleverelephant.ca> 17/09/08 5:15 PM >>>
> John,
> 
> The idea that CGI is naturally a much slower situation than a 
> long-running process is a bit of a red herring in the case of 
> Mapserver, and I say that as someone who is anal retentive about
> these things.  Unless your Mapserver installation has some naturally
> latent components (database connections, primarily) you'll find that
> moving from CGI to FastCGI is worth about 15ms per request.
> 
> On Wed, Sep 17, 2008 at 8:40 AM, John Westwood
> <John.Westwood at port.ac.uk> wrote:
> 
>> The reason I am trying to get MapServer to work with fast_cgi is
>> because I am experiencing poor performance with OpenLayers. I
>> believe that OpenLayers starts a new MapServer instance for each
>> tile request, thus causing an unnecessary overhead. Am I correct?
> 
> Yes and no. If you are experiencing noticeably poor performance (you 
> can actually *see* it being slow) the only place that the CGI
> overhead could be the cause is if you're connecting to Oracle or SDE
> for some of your layers. If that's not the case, look elsewhere
> first, the very small gains you will receive from moving to FastCGI
> will not change your underlying problem.
> 
> Paul
> 
> _______________________________________________ mapserver-users
> mailing list mapserver-users at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2#EmbeddedMap.js
Type: application/x-javascript
Size: 4824 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080922/280b42d7/2EmbeddedMap-0001.js
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080922/280b42d7/3gbhgis_openlayers-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4#gbhgis.map
Type: application/octet-stream
Size: 17185 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080922/280b42d7/4gbhgis-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5#Part.004
Type: application/octet-stream
Size: 169 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080922/280b42d7/5Part-0001.obj
-------------- next part --------------
AdmID:D62491974A287F2FE3C26A32D14F4ACD


More information about the mapserver-users mailing list