Hi Sam,

You have no mentioned whether or not you created spatial indices on your 
geometries. Such indexes won't help much when plotting the entire dataset, but 
will dramatically improve plotting (retrieving) subsets of it.

I suggest you use the PostGIS function ST_SimplifyPreserveTopology() to 
populate an extra geometry column in each table, which should have 
significantly fewer vertices. Then in your mapfile, use scales dependent 
layers, so that when zoomed out you use the simplified column, and at larger 
scales you use the full resolution column. You can assign these to the same 
group, so they are treated as a single layer from the user's perspective, but 
mapserver retrieves and renders data at a detail (& hence volume) appropriate 
for the current scale automatically. When you zoom out, you seldom need the 
full resolution data, so simplified versions are fine, and much faster.

This is the vector data equivalent of raster layers at different resolutions to 
support zoom layering (or scale based layers).

If you have the cpu & memory, PostGIS can be fast enough to have the simplified 
layer generated as a view on the full dataset, or as a query in the mapfile 
data definition sql, but given your specs, a separate column will probably give 
better results.


Cheers,

   Brent Wood 


--- On Thu, 5/7/09, Robert Sanson <sans...@asurequality.com> wrote:

> From: Robert Sanson <sans...@asurequality.com>
> Subject: Re: [mapserver-users] expected speeds.
> To: "Sam Ingarfield" <sjfingarfi...@gmail.com>, 
> mapserver-users@lists.osgeo.org
> Date: Thursday, May 7, 2009, 8:48 AM
> 
>  
>  
>  
> Hi Sam
>  
> I would try turning the Coastline layer into a
> Shapefile and serving it from the Mapserver machine in a
> local directory. Postgis is probably overkill given the
> layer is probably static (unlikely to need changing).
>  
> regards,
>  
> Robert
> 
> >>> Sam Ingarfield <sjfingarfi...@gmail.com>
> 7/05/2009 2:27 a.m. >>>
> Hi;
> 
> I've just been through a bit of an optimisation process
> on my server and was wondering whether the speeds that I am
> obtaining are somewhat inline with what could be expected
> with the hardware/datasets that are in use.
> 
> Firstly: Hardware.
> 2.2Ghz Xeon (Single Core, but with hyperthreading. not that
> hyperthreading helps much.)
> 1.2Gb Memory coupled with over 2Gb of swap (was filling up
> memory and original swap realllly fast so swap was
> expanded)
> Data being served off an array of three ultra320 15k scsi
> drives in a raid-5 config.
> 
> Software.
> OS: Debian
> Mapserver: Nighly build as of 6/5/09, in fastcgi mode
> Data source: Postgis database
> 
> Data:
> Coastline Layer (9 Polygons with a stupid number of
> vertices, this is a known slow point due to toast table
> problems. or at least we think it is)
> Islands Layer (~9000 polygons, only ~4mb)
> Internal Waterbodies layer (~11000 polygons, plus ~1.2m
> lines, 800mb all up)
> 
> Performance:
> On a moderate zoom level, about 2s per 256x256 tile.
> On more zoomed out levels, process times out before
> completing. and yes, some generalisation needs to take place
> at further out zoomage but thats not sorted yet.
> If i drop the coastline layer out (the toast problem one),
> speed ups to like 80-100ms/tile
> 
> 
> So, watchathink?
> 
> 
> 
> 
> Click here
> to report this email as spam.
> 
> 
> ------------------------------------------------------------------
> 
> The contents of this email are confidential to AsureQuality. If you have 
> received this communication in error please notify the sender immediately and 
> delete the message and any attachments. The opinions expressed in this email 
> are not necessarily those of AsureQuality. This message has been scanned for 
> known viruses before delivery. AsureQuality supports the Unsolicited 
> Electronic Messages Act 2007. If you do not wish to receive similar 
> communications in future, please notify the sender of this message.
> 
> ------------------------------------------------------------------
> 
> 
> This message has been
> scanned for malware by SurfControl plc.  www.surfcontrol.com
>  
> 
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to