Performance Tuning a Mapfile

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Mon Jan 10 17:33:02 EST 2005


Sean Gillies wrote:
> On Jan 10, 2005, at 3:05 PM, Stephen Woodbridge wrote:
>
>> Sorry for the cross posting to the Dev list, but I think this is a
>> topic
>> that needs to be highlight there also.
>>
>> So I am back to trying to do some performance tuning of my mapfiles. On
>> my layer post someone suggested using DEBUG ON. I think this is or a
>> similar mapfile option is the correct approach. Unfortunately, on
>> Mapserver 4.01, DEBUG ON was less than helpful. I only got a single
>> line:
>>
>
> "Someone" was me.  Newer versions of MapServer have all kinds of debug
> output for checking performance.  I'm sorta against this, because there
> are better ways to do it: gprof for mapserv, or write a Python (or
> whatever) script to draw your map and call it with profile.run() (or
> whatever).
>
> This is a great excuse to upgrade your MapServer!

Sean,

I thought it might have been you but didn't want to give the wrong
attribution :) Any way there is a bug on this #882 and I added my
comments to that.

I will definitely get a new version of mapserver for my dev environment
just so I can test this.

gprof is great if you are a programmer and you want to improve your
code, but if you are just a mapfile developer is will not be all the
helpful. For example, there is no way to get the cost on a per layer
basis, there is not way to get a count of the number of files opened, or
the number of objects rendered, or the number of objects scanned but not
rendered, let alone do that on a per layer basis.

I develop code in C, Perl, PHP and other languages and what I need it
stats, not another opportunity to write more code :) I way to big a
backlog of projects I'm not working on. Also remember that some of our
users that are having trouble just building a mapfile, will need to
evaluate performance if they push it into any kind of high load
production environment.

OK, off to download 4.4 and see what kind of good stuff it has :)

Thanks again for your suggestions and comments.
   -Steve W.



More information about the mapserver-users mailing list