<div dir="ltr"><div>Hi Elari,</div><div><br></div><div>I'm the author of that repo.  The format of the input raster data is critical to achieve optimal /vsis3/ performance. Much more so than multithreading/multiprocessing configuration.  I have had the best performance serving raster data formatted as a Cloud Optimized GeoTIFF (COG).  Newer versions of GDAL have a COG driver <a href="https://gdal.org/drivers/raster/cog.html">https://gdal.org/drivers/raster/cog.html</a> . You can convert your raster data to a COG like so:</div><div><br></div><div>> gdal_translate input.jp2 cog.tif -of COG<br></div><div><br></div><div>A couple of GDAL config options can substantially improve Mapserver performance reading data from /vsicurl/ filesystems. Here are some settings you can put in your Mapserver mapfile:</div><div><br></div><div>CONFIG "CPL_VSIL_CURL_ALLOWED_EXTENSIONS"       "tif vrt gpkg zip shp shx dbf qix cpg prj"<br>CONFIG "GDAL_DISABLE_READDIR_ON_OPEN"         "YES"<br></div><div><br></div><div>There are a lot of other GDAL config options to improve performance.  Here is a good writeup that closely matches my experience serving imagery stored by a cloud computing provider like S3:</div><div><a href="https://developmentseed.org/titiler/advanced/performance_tuning/">https://developmentseed.org/titiler/advanced/performance_tuning/</a><br></div><div><br></div><div>Cheers,</div><div>Pete</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 22, 2022 at 1:12 AM Elari Roop <<a href="mailto:elari.roop@gmail.com">elari.roop@gmail.com</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"><div dir="ltr">Hi all, <div><br></div><div>I am rather new to mapserver and I am trying to read mosaic from S3, but I have run into perfomance issues.<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><a href="https://github.com/pedros007/mapserver-docker" target="_blank">https://github.com/pedros007/mapserver-docker</a> </blockquote><div><br></div><div>I folowed the instructions above, but it seems that increasing number of threads below does not have any impact on perfomance.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">CONFIG "GDAL_NUM_THREADS" "50"</blockquote><div> </div></div><div>Could it be that the mapserver is reading data with only one thread or could this be related to something else like overviews configuration, reading from tileindex shp file etc?</div><div><br></div><div>Best regards,</div><div>Elari</div></div>
_______________________________________________<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><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Pete</div></div>