performance issues

Frank Warmerdam warmerdam at POBOX.COM
Tue Oct 18 13:54:56 EDT 2005

On 10/18/05, Bart van den Eijnden <bartvde at> wrote:
> Hi list,
> on a very fast Red Hat machine we are running into Mapserver performance
> problems (Mapserver 4.4.2). It's a basic MAP file with 4 shapefiles,
> nothing special. Mapserver debugging reports 0.6 seconds processing, but
> mapserv over the commandline takes a lot more time to finish as you can
> see below. The same applies to shp2img.
> Does anybody have an idea what could be going on?
> time ./mapserv
> "QUERY_STRING=map=/data/OGC_UMN_services/
> vnd.ogc.se_inimage"
> > /tmp/out2.png
> CGI Request 1 on process 26586
> msDrawMap(): Layer 3 (NL-prov), 0.034s
> msDrawMap(): Layer 2 (bebouwing), 0.515s
> msDrawMap(): Layer 0 (rijkswegen), 0.016s
> msDrawMap(): Layer 1 (vaarwegen), 0.009s
> msDrawMap(): Drawing Label Cache, 0.000s
> msDrawMap() total time: 0.585s
> real    0m5.485s
> user    0m5.300s
> sys     0m0.190s


Normally when I run into this sort of problem, I would
build MapServer in debug mode, and run it in gdb.
Then hit "cntl-c" a few times during the run and get
a traceback to see what is going on.  This crude sampling
technique can often identify especially major performance

If the statistics on msDrawMap() are accurate then the
bulk of the delay must be somewhere else.  Perhaps the
compression of the PNG (though it does not seem
especially large) or some sort of preprocessing (getting
projections during .map processing?)

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at
light and sound - activate the windows |
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the mapserver-dev mailing list