[mapserver-dev] MapScript multithreading performance

Frank Warmerdam warmerdam at pobox.com
Mon Feb 11 10:39:24 EST 2008


Tamas Szekeres wrote:
> Adrian,
> 
> I'm not aware of much locking around the drawing code of it's own.
> This might be another issue I think. Would you share your mapfile and
> the C# code you test with?
> How do you detect which part of the code causes the problem and which not?
> 
> I expect your problem reported might be related to some operations
> requiring heavy resource access (eg. file loads during epsg lookups).
> Have you monitored your disk access that might also be optimized?
> 
> I'm not sure if the processor usage is the perfect measure of the
> efficiency of the application either.

Adrian,

I agree with Tamas - we don't have enough information to give an informed
answer.

I will note that DrawMap() has to access the feature data, and so is quite
subject to feature access lock contention.  For instance, if you are using
CONNECTIONTYPE OGR and MapServer 5 there is a big lock around OGR.  That means
only one drawing thread at a time can be in OGR fetching data which is often
the dominant time consumer.

So, providing details of your datasource would be helpful.  But really,
you need a way of interrupting your threads to see where they are blocked
in some fashion to get a better sense of what is the hold up.

I will say, that I'm unaware of any locks around the rendering work itself,
at least with the GD vector rendering code.  So for actual rendering intensive
applications, multi-threading should give good cpu utilization.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapserver-dev mailing list