<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><div data-html-editor-font-wrapper="true" style="font-family: arial, sans-serif; font-size: 13px;">Hi<br><br>I have had a similar situation as You with large national data sets in shape format. One of the biggest improvements for me has been to split large shape files into smaller and<br>then use vector tile indexes in Mapserver.<br>The tool shp2tile has been working well for me. Stephen Woodbridge has written that tool. It can be found at <a href="http://imaptools.com/download-software.html">http://imaptools.com/download-software.html </a><br>I think that You had to compile yourself on linux, but that was easy.<br><br>I have an example where I have automated this in a script that runs through all shape file in a directory and splits shape files larger than a certain size and then creates the vector tile index files.<br>The code snippet that is part of larger import script can be found here:<br><a href="https://gist.github.com/LarsSchy/644b37ab2b1e58b48808bfb2b57d0359">https://gist.github.com/LarsSchy/644b37ab2b1e58b48808bfb2b57d0359</a><br><br>The script snippet also shows the normal optimizations we do.<br><br>Hope this could give You some ideas how optimize and make Mapserver and Mapcache run faster. I also ran into the problem with to many inodes. <br>That got solved by using sqlite as backend in Mapcache.<br><br>Best regards / Lars Schylberg<br><br><br><br>11 november 2019 kl. 15:42, "Travis Kirstine" <<a target="_blank" tabindex="-1" href="mailto:traviskirstine@gmail.com?to=%22Travis%20Kirstine%22%20<traviskirstine@gmail.com>">traviskirstine@gmail.com</a>> skrev:<br> <blockquote><div><div> <div dir="ltr"> <div>I may not be unrealistic for it take mapserver to 4-6 seconds to generate 4096px image depending on the amount data being rendered and the complexity of your styles / expressions / labels. If your mapserver is able to generate a 1024x1024 in under a second that is pretty good. Like Jukka and other suggest I would look at translating the files to shp files with spatial indexes or postgis tables with spatial and attribute indexes if necessary. Preprocessing the data (simplification / prefiltering / point thinning cluster) and using SCALETOKENs to reference different source layers at different scales can lead to big performance boosts at the mapserver end.</div> <div></div> <div>For us the biggest limiting factor has been the write blocking to sqlite cache when seeding tiles, if you increase the number of threads / process in mapcache seed those process will just end up waiting to write to the cache. You can generally figure out what the max number of processes the cache can handle by running a seed on a test area and look at the number of tiles seeded per second, as some point -n will have no effect which your process are just waiting to write the cache. I would look at using this method to test sqlite vs disk or other backends. The GeoTiff cache may be promising as it appears to be non-blocking but experimental...</div> <div></div> <div>We use a riak cache with a riak leveldb backend which works well for us but is a bit of a pain to manage as it difficult to delete objects so it's not great for caches that need to be refreshed.</div> <div></div> <div>Finally you may want to test MapProxy as an alternative to MapCache (we use both). MapProxy supports a non-blocking compact cache that could solve your inode problem</div> <div></div> <div>Regards</div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> <div> <div dir="ltr">On Fri, 8 Nov 2019 at 11:48, Sebastiano Laini <<a target="_blank" rel="external nofollow noopener noreferrer" tabindex="-1" href="mailto:Sebastiano.Laini@buchanancomputing.co.uk">Sebastiano.Laini@buchanancomputing.co.uk</a>> wrote:</div> <blockquote style="margin: 0px 0px 0px 0.8ex;border-left: 1px solid rgb(204,204,204);padding-left: 1ex"> <div lang="EN-GB"><div> <p><span style="color: rgb(31,73,125)">We don’t create the data, we rely on OS (ordnance survey) to supply us the maps files and then we publish them in our service but I assume that probably we will need to create some flow to improve it or download it in other format that is faster.</span></p> <p><span style="color: rgb(31,73,125)">Sebastiano Laini</span></p> <p><span style="color: rgb(31,73,125)">Web Developer</span></p> <p><span style="color: rgb(31,73,125)">Buchanan Computing</span></p> <div><div style="border-color: rgb(225,225,225) currentcolor currentcolor;border-style: solid none none;border-width: 1pt medium medium;padding: 3pt 0cm 0cm"><p><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Fawcett, David (MNIT) [mailto:<a target="_blank" rel="external nofollow noopener noreferrer" tabindex="-1" href="mailto:david.fawcett@state.mn.us">david.fawcett@state.mn.us</a>]<br><b>Sent:</b> 08 November 2019 16:41<br><b>To:</b> Sebastiano Laini <<a target="_blank" rel="external nofollow noopener noreferrer" tabindex="-1" href="mailto:Sebastiano.Laini@BuchananComputing.co.uk">Sebastiano.Laini@BuchananComputing.co.uk</a>>; 'Rahkonen Jukka (MML)' <<a target="_blank" rel="external nofollow noopener noreferrer" tabindex="-1" href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>>; '<a target="_blank" rel="external nofollow noopener noreferrer" tabindex="-1" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>' <<a target="_blank" rel="external nofollow noopener noreferrer" tabindex="-1" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br><b>Subject:</b> RE: mapcache seed speed optimization</span></p></div></div> <p><span style="color: rgb(31,73,125)" lang="EN-US">For data formats that are slower to read, would it add fit your workflow to convert it to different data format before creating the tiles? </span></p> </div></div>_______________________________________________<br>mapserver-users mailing list<br><a target="_blank" rel="external nofollow noopener noreferrer" tabindex="-1" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a rel="external nofollow noopener noreferrer" target="_blank" tabindex="-1" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a> </blockquote> </div> </div></div></blockquote> <br><br><signature></signature> </div></body></html>