[mapserver-users] MapServer derived MVTiles Benchmark test vs. T-Rex tile server

karsten karsten at terragis.net
Mon Mar 11 15:15:02 PDT 2019


Dear All,

I  am working on optimizing a MapServer /MapCache configuration of  a
benchmark for creating MVT tiles (seeding) of MapServer - versus T-Rex. 

This will be featured in a presentation at the German FOSS4g ('FOSSGIS')
2019 in Dresden at the end of this week. The whole thing is based on Pirmin
Kalberer's automated vector tile benchmark see -
http://blog.sourcepole.ch/2018/09/06/the-tale-of-a-vector-tile-benchmark/ .
Thus I created a similar configuration of the Natural Earth Data based world
map for MapServer (my favorite rendering engine !) to run it against T-REX..
Now Pirmin has added this into the GitHUB repository as a 'MapServer' branch
see - https://github.com/pka/mvt-benchmark/tree/mapserver

Results of one of my first trial benchmarks can be found here
https://github.com/karstenv/mvt-benchmark/tree/master/firsttests .

Unfortunately my favorite software (MapServer /MapCache.fcgi) is falling
pretty far behind in seeding speed in these tests 
see e.g. in
https://github.com/karstenv/mvt-benchmark/blob/master/firsttests/http.jpg

Thus, I wanted to call in the experts to find out what configuration tweaks
will help to increase the MapServer / Mapcache  performance.

So far my next steps I will be working on 
----------------------------------------------------------------------------
----------------------
1.) Setting the correct map file parameters to match the T-Rex configuration
for the FORMATOPTIONS 
"EXTENT" and "EDGE_BUFFER" in the OUTPUTFORMAT  bloc.

OUTPUTFORMAT 
     NAME "mvt" 
     DRIVER MVT 
     FORMATOPTION "EXTENT=512" # default is 4096. # Comment by Pirmin for
t-rex this is 'tile_size' (per Layer): Width and height of the tile
(Default: 4096. Grid default size is 256)
     FORMATOPTION "EDGE_BUFFER=20"  # Comment by Pirmin -  seems to be the
'buffer_size' in mvtbench.toml , is set to 3 for the Country layer, for all
others
END

Any suggestions wthat my best bet settings are in the map file is for
MapServer for "EXTENT" and "EDGE_BUFFER" ?

----------------------------------------------------------------------------
----------------------
2.) Tweaking the data statement of the map file to match the T-Rex config 
So far I have e.g. for the countries layer
DATA "wkb_geometry from (SELECT * FROM ne_10m_admin_0_countries) as temp
using unique ogc_fid using SRID=3857"
while T-Rex has
sql = """SELECT wkb_geometry, adm0_a3, mapcolor7 FROM
ne_10m_admin_0_countries WHERE min_zoom::integer <= !zoom! AND wkb_geometry
&& !bbox!""" 
see
https://github.com/karstenv/mvt-benchmark/blob/master/t-rex/mvtbench.toml
I am still trying to match the T-Rex statement above but did not come up
with a  suitable comparable MapServer data statement so far.

Any suggestions for this anyone ?
----------------------------------------------------------------------------
----------------------

3.) Does anyone have any other/ additional suggestions what else might help
to increase MapServer /MapCache performance ?

Thanks 
Karsten 

PS: The map file used is here
https://github.com/karstenv/mvt-benchmark/blob/master/MapServer/mapcache_mvt
.xml,
the MapCache config here
https://github.com/karstenv/mvt-benchmark/blob/master/MapServer/mapcache_mvt
.xml 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20190311/8df7b299/attachment.htm>


More information about the MapServer-users mailing list