MapServer Performance Tips

Gregor Mosheh gregor at HOSTGIS.COM
Tue Aug 7 13:33:10 EDT 2007


> I'm not sure if having those as shapefiles is best and what else I
> should do to improve those

Shapefile is a pretty fast format. Hard to beat.


> about 75+ shapefiles that I've brought together as one layer using a tile
> index. Also, I'm needing to break up the combined layer into 5 layers using
> expressions. The size of each shapefile is between a few MB and up around
> 100MB.

Doesn't sound like a major problem. We deal with stuff on that order all 
the time and get good performance. Of course, 8 CPUs and a boatload of 
RAM help.

Did you shptree all of the shapefiles, including the tileindex? That can 
help a lot. There's also "sortshp" which physically sorts the file so 
that seeks aren't as random. (I should add that to the page.)

Beyond that, it's hard to give any specific advice without any specific 
details. Are you experiencing a problem with speed, or just looking to 
make fast even faster? Is a specific layer being problematic? Could you 
perhaps make the expressions more efficient, maybe merge some layers 
together using expressions? (you had said that you broke it into layers 
by expression, thought I'd ask)

-- 
Gregor Mosheh / Greg Allensworth
System Administrator, HostGIS cartographic development & hosting services
http://www.HostGIS.com/

"Remember that no one cares if you can back up,
  only if you can restore." - AMANDA



More information about the mapserver-users mailing list