Increase Tiles Caching Speed (TileStache)

I would say that for zoom greater than 15, if you split your area of interest into smaller areas(Bounding box), you will be able to cache them in much less time by running multiple processes on a single machine.

For example, you are running zoom 16 (having 50,000,00 tiles) on a machine and according to your average tile-caching speed, this process will complete in about 40-50 days. Lets say you split these tiles in to two and run them simultaneously on the machine then you will be able to cache them in 20-25 days because tilestache seeding process uses only about 30 percent of your processor for a single tile caching process and I know this because i have the same issue once and up to some extant this solved my problem.

It won't effect the tile-caching speed if you are running a single process on a machine or multiple processes but the CPU usage will be increased.

I hope this will help you.


By default shp2pgsql does NOT create indexes. You need to pass -I to make it generate a spatial index. http://postgis.net/docs/manual-1.3/ch04.html#id435762

Check if your table has an index by running \d tablename in psql. In the list of indexes should be a line with "gist" (unless you picked a different index) and your geometry column name.

You can add one after the fact as well, see http://postgis.net/docs/manual-1.3/ch03.html#id434676 (don't let the note about lossiness scare you):

CREATE INDEX [indexname] ON [tablename] USING GIST ( [geometrycolumn] );

Since you probably also use non-spatial columns in your queries, you usually want to create indexes for each column that is used for lookup. If for example you have a query like SELECT * FROM roads WHERE priority = 3; then priority is used and adding a index for it will significantly speed-up things:

CREATE INDEX idx_roads_priority ON roads(priority);.