<div dir="ltr"><div dir="ltr">Hi James,<div><br></div><div>I am not familiar with fcgiwrap.  Here's what my setup looks like:</div><div>Nginx proxies to MapServer listening on a unix socket.  <a href="https://github.com/pedros007/debian-mapserver/blob/master/etc/nginx/sites-available/mapserver_proxy.conf">https://github.com/pedros007/debian-mapserver/blob/master/etc/nginx/sites-available/mapserver_proxy.conf</a>  This looks pretty similar to your nginx conf: </div><div><a href="https://github.com/kalessine/mapserver-benchmark/blob/c7927f9482b28cce2e2585296f760c2ba3547ca5/nginx-fcgiwrap/default#L56-L69">https://github.com/kalessine/mapserver-benchmark/blob/c7927f9482b28cce2e2585296f760c2ba3547ca5/nginx-fcgiwrap/default#L56-L69</a></div><div><br></div><div>I use supervisord to start 8 mapserv processes listening on the above socket.  Here's my supervisord config: <a href="https://github.com/pedros007/debian-mapserver/blob/master/etc/supervisor/conf.d/supervisord.conf">https://github.com/pedros007/debian-mapserver/blob/master/etc/supervisor/conf.d/supervisord.conf</a></div><div>Supervisor starts both nginx and the 8 mapserv processes.  This really simplifies server startup in my Dockerfile:</div><div><a href="https://github.com/pedros007/debian-mapserver/blob/88ef21ae0846db5732e782a2dd56e925c149acd8/Dockerfile#L72">https://github.com/pedros007/debian-mapserver/blob/88ef21ae0846db5732e782a2dd56e925c149acd8/Dockerfile#L72</a><br></div><div><br></div><div>I haven't done much benchmarking on this in several years. At one point I did experiment with Apache mod_fcgi and got pretty good performance. From what I recall this was ever so slightly faster. In any case, when my Docker container runs on an AWS EC2 instance,  MapServer returns 256x256 raster jpgs from GeoTIFFs stored in an AWS S3 Bucket in about 300-500 ms under reasonable loads.  Local optimized GeoTIFFs can be much faster, especially on SSDs (less than 100ms) using this setup.</div><div><br></div><div>Hope that helps!</div><div>Pete</div><div> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 4, 2020 at 8:18 AM James Gardner <<a href="mailto:jsg@internode.on.net">jsg@internode.on.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br>
<br>
I have done some preliminary work on a mapserver benchmarking project....<br>
<br>
<a href="http://github.com/kalessine/mapserver-benchmark/" rel="noreferrer" target="_blank">github.com/kalessine/mapserver-benchmark/</a><br>
<br>
documentation is sparse at the moment, but i'll do some more work on <br>
this next week...<br>
<br>
my initial tests show that mapserv called by fcgiwrap from nginx is <br>
quite slow :( there seems to be<br>
<br>
an additional 1 second of latency added to each request... if anyone <br>
knowledgeable on ubuntu 18.04, nginx, fcgiwrap and mapserv could have a <br>
look at my server script (under mapserver-benchmark/nginx-fcgiwrap/ and <br>
give me some advice as to where i'm going wrong...<br>
<br>
i'm thinking it may be in the fastcgi_params file that comes stock with <br>
nginx..<br>
<br>
apache2 responds to requests much (6x requests in 10mins) faster...<br>
<br>
suggestions welcome!<br>
<br>
Thanks,<br>
<br>
    James Gardner<br>
<br>
<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Pete</div></div>