[mapserver-users] performance problem
fedesan
fedesanchez888 at gmail.com
Fri Jun 11 13:49:24 PDT 2010
I' having performance problems using postgreSQL 8.4 and mapserver 5.0.0 on a
4 cpu's sever with 16 GB RAM
I was using a mapfile with 10 layers but in order to find out the problem
now i'm using just one layer in a really basic mapfile.
gis.states_g table has only 24 records, one for each state in my country, so
is not a heavy query and i'm starting to think that is a mapserver
problem...is this a 5.0.0 known issue?
When i load the map (using openlayers) i notice that the 4 cpu's goes to
100% for a couple of seconds, and the same happens when i pan or when i zoom
in (this is even worse)
Can anyone give some tips about this? can somebody see an error that i'm
missing?
I'm not using fast-CGI, should i ??
**This is my mapfile and my html file:
MAP
NAME WMS_server
STATUS ON
SIZE 600 400
EXTENT -20000000 -7692209 2000000 -2212564
UNITS meters
IMAGECOLOR 216 243 249
OUTPUTFORMAT
NAME png
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE PC256
EXTENSION "png"
END
WEB
LOG /var/www/mapas/aen/educacion/mapfish/log_mapa_wms.log
METADATA
"wms_title" "MEN WMS Server"
"wms_srs" "EPSG:900913"
END
END
PROJECTION
"init=epsg:900913"
END
LAYER
NAME "states"
STATUS OFF
CONNECTIONTYPE Postgis
CONNECTION "user=fede password=fede dbname=men host=localhost"
DATA "geom900913 from (select gid,geom900913 from gis.states_g) as foo
using unique gid using SRID=900913"
TYPE POLYGON
LABELMINSCALE 1500000
TOLERANCE 2
CLASS
STYLE
OUTLINECOLOR 156 156 156
END
END
PROJECTION
"init=epsg:900913"
END
END
END
HTML
function init(){
map = new
OpenLayers.Map('map',{projection:"EPSG:900913",maxExtent: new
OpenLayers.Bounds(-9186607, -8000000, -5948152, -1808791),maxResolution:
"auto",units: "m"});
var wms = new OpenLayers.Layer.WMS(
"wms",
"/cgi-bin/mapserv?map=path/mapa_wms.map&format=image/png&info_format=text/plain",
{layers:"states",transparent: true, format: "image/png"},
{isBaseLayer: true},
{singleTile: true, ratio: 3},
{gutter: 15}
);
map.addLayers([wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToMaxExtent();
}
Thanks!!
Fede
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/performance-problem-tp5169667p5169667.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list