Visual Studio 2008
.net frmaework ver 3.5
windows server 2008
48 amd core processors
32 GB RAm
I am having problems running my multithreaded application. the application only takes advantage of between 30-40% of my processors capability. I ran visual studio profiler to try to identify what the problem is. I found there was a lot of contention from mscorwks.dll. This seems to be responsable for garbage collection. Each thread is designed to pretty much work in isolation only reporting progress as it goes. i am inheriting from BackroundWorker for use on my worker threads. i have tried all combinations of GCSettings.LatencyMode, And i tried using server instead of workstation mode, and i tried running each worker thread as a single threaded apartment(STA), but these efforts didn't make much difference.
My temporary solution has been to open up multiple instances of my application(running 4 threads each), so they run in seperate processes. This works quite well and takes advantage of the servers full processing power. Anyone got any ideas of how i can acheive the same thing on with one application instance?
Loading
Sam HobbsPosted Nov 9, 2011, 5:31 PM
Are you able to determine if more work is done over-all if you use 4 processes instead of 1? I admit that I don't know enough to know what the efficiencies and innefficiencies are but the overhead required by multiple processes might be greater than the benefits.
Darren ScottPosted Nov 9, 2011, 3:07 PM
Sam HobbsPosted Nov 4, 2011, 3:44 PM
I don't know how to use the profiler to do it, but you need to determine what the processor is waiting for, such as disk IO. If each thread is accessing various areas of the disk then the drive might need to do many seeks which is costly. Another possibility is virtual storage thrashing; main memory is cheap enough that most systems have ample main memory but if your application is using more main memory than the system has real memory available for use then that could be a costly bottleneck. You need to look for things like that.