Hi Steve,<div><br></div><div>TileMill is not designed for that kind of application (running as a live server with no cache), though it will work 'a bit'.</div><div><br></div><div>So: it doesn't do caching - you'll want a cache. Look at CloudFront, nginx's cache, varnish, squid, and so on.</div>
<div><br></div><div>Tuning the database: check that you have all possible indexes installed and the data is in EPSG:900913.</div><div><br></div><div>The long-term answer is switching to something designed to be a live-server (mod_tile, TileStache) or rendering your tiles and serving them from MBTiles (with TileStache or TileStream).</div>
<div><br></div><div>Tom<br><br><div class="gmail_quote">On Wed, Feb 27, 2013 at 6:03 AM, Steve Bennett <span dir="ltr"><<a href="mailto:stevagewp@gmail.com" target="_blank">stevagewp@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
  (First - is this the right list to discuss using TileMill? I can<br>
only find the MapBox support form, or gis.stackexchange.)<br>
<br>
I'm having some problems with TileMill rendering very slowly.<br>
Sometimes it seizes up altogether, until I restart it or reboot the<br>
server. This seems to happen particularly when I frequently interrupt<br>
rendering by saving the stylesheet again.<br>
<br>
My setup is a 2-core, 8Gb Ubuntu VM running on an OpenStack cluster.<br>
PostGIS (with Melbourne city data from <a href="http://bbbike.org" target="_blank">bbbike.org</a>), nginx for auth,<br>
and one shapefile. Pretty vanilla.<br>
<br>
I have a few questions about how to improve speed in TileMill/Mapnik:<br>
1) In general, what kinds of rendering rules are slow? Does the way<br>
you specify a rule affect the speed? (eg, is [zoom>13] { #ways[...] }<br>
slower/faster than #ways[...][zoom>13] ?)<br>
2) How does caching take place? It seems to me that when saving a<br>
stylesheet with changes, there's a long delay before anything renders,<br>
then subsequent small changes aren't too slow. So some layers are<br>
computed once then reused?<br>
3) Are there any easy tips for tuning the database?<br>
4) Or tuning TileMill/Mapnik?<br>
5) Watching 'top' during a render, it doesn't look like much memory is<br>
being used. Is there a way to trade memory for speed?<br>
6) Does setting a layer invisible definitely prevent it being<br>
computed? Sometimes I think I'm going mad...<br>
7) Lastly,will adding cores lead to a proportional increase in speed?<br>
<br>
Thanks very much in advance,<br>
Steve<br>
<br>
_______________________________________________<br>
talk mailing list<br>
<a href="mailto:talk@openstreetmap.org">talk@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/listinfo/talk" target="_blank">http://lists.openstreetmap.org/listinfo/talk</a><br>
</blockquote></div><br></div>