[mapserver-users] fastcgi performance question

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue Mar 31 11:05:04 PDT 2020


Hi JG,

I think your benchmarking is very useful for the MapServer community, 
especially the timing since with PROJ 6+ there will possibly be more of 
a requirement for performance through mapscript and FastCGI (that's the 
initial rumours anyway).  So that's my first comment, is to also focus 
on specific PROJ versions in your testing (PROJ 6 and master versus PROJ 
5.2.0 with MapServer) and how that impacts CGI, MapScript and FastCGI; 
and by reviewing those numbers we the community can learn and tackle the 
best way forward.  I am sure those results would be really useful for 
the entire community (as well as the configuration required).

PHP7 brought many speed improvements, so in that sense I'm not surprised 
by your numbers, plus just the number of tickets, comments, emails, 
posts about PHPMapScript shows that it is still heavily used for 
performance sites.  I'm also curious as to results with using different 
SWIG versions as well, as that is a common question in regards to the 
new 'PHPNG' SWIG support for PHP7 in MapServer.  Maybe consider that for 
your benchmarks.

I think it's great that you are using GetMap requests for testing, as 
this is such a common question/post, regarding speed of display in a WMS 
service inside tools such as QGIS, by users.

You mention MapProxy, but could you also please compare speeds with 
MapCache?  (as MapCache is well maintained & part of the MapServer family)

Regarding data format, instead of just Shapefile maybe also test against 
a GeoPackage (SQLite database), and possibly GeoJSON or also PostGIS (in 
other words hit all of the big demand ones for MapServer now).

Obviously this will require MapServer 7.4.4 (and for recent PROJ testing 
MapServer-master at the moment, as well as a recent GDAL).

I could see these benchmarks as really helping the MapServer dev team, 
just as the 'WMS Benchmarking' exercise was for so many software teams 
at past FOSS4G events.

Please be sure to share all scripts, mapfiles, configuration etc.  It 
would be great if you could document your files, scripts, and results on 
the MapServer wiki: https://github.com/mapserver/mapserver/wiki

And thank you for sharing and making the effort!

Please keep us posted!

-jeff




-- 
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/









On 2020-03-29 7:39 p.m., James Gardner wrote:
> 
> Hi!
> 
> I have been doing some benchmarking of mapserver running through 
> fastcgi, and an experiment with mapserver called through php through 
> ms_iohandlerequest, running through php seems significantly faster (8x) 
> than through fastcgi...
> 
> the benchmark I am using is a log of GetMap requests from our production 
> servers...
> 
> called through a program called 'siege' with 20 concurrent connections...
> 
> my setup is;
> 
>           ubuntu 18.04 LTS,
> 
>           gdal-2.4 from ubuntugis stable
> 
>           mapserver 7.4.1 from ubuntugis-stable
> 
> 
>           php7.2 from ubuntu-stable
> 
> 
> When I hook mapproxy up to /cgi/bin/mapserv?map=
> 
> i get 10000 request per 10 minutes answered...
> 
> when i hook mapproxy up to /mapser/mapserv.php
> 
> I get 80,000 requests per 10 minutes answered...
> 
> for a 20 Mb shapefile with 70,000 points to display...
> 
> mapserv.php is a php file that parses the url and calls ms_iohandlerequest
> 
> mapproxy is set to not cache that particular layer...
> 
> I have tried going straight to the fastcgi path /cgi-bin/mapserv?map=
> and straight to the php file, but the php file is always faster... if 
> you want i can
> make some docker container scripts to illustrate the point...
> 
> 
> does anyone have any ideas what could be causing this difference?
> 
> Thanks.
> 
>    JG.
> 
> 


More information about the mapserver-users mailing list