Mapscript multithreading and performance

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Mapscript multithreading and performance

adrian kruk
Hi
I did some multithreading tests of mapscript (C#/.NET 2.0). (We've discussed
before about safety and performance in mapscript.)

Purpose was to test performance when simultanouly running threads are making
 actions on map object like pan, zoom, querybyattribute etc. Each thread at
start get own map object and then some those actions was did.
Threads was running on 4 processors machine.
-Windows2003EE+SP3,
-Intel Xeon E5320,
-4GB RAM,
-MapScript ver:5.1-dev downloaded from
http://www.coordinatesolutions.com/download/ASPNET20Sample_50.zip 

I used shapefiles stored on RAID (1GB of data).

Find out that there is no problem with statics variables which is used in
mapfile parsing. During parsing simultanously 200 threads, processors was
used in 98-100%. It is OK.
Guess that probably the there is a problem with draw method. It seems like
it is significant bottle neck.  During tests, when threads was executing
methods like: zoomPoint, setExtent, queryByAttributes, drawLegend,
drawScalebar, and draw, processors was used in 25-35 % ONLY. So only one
processor was still used in 100%.

Anyone knows why it is happening? How to improve performance?
I guess that the reason is locks in draw process.


Regards,
Adrian Kruk
infovidematrix.pl