Thread Blocked .Net Desktop application

Code and memory profiling for .NET developers.

Moderators: Brian Donahue, richardjm, Bart Read, StephenC

Thread Blocked .Net Desktop application

Postby jefflundstrom » Wed Apr 22, 2009 6:38 pm

Hello,

I bought ants to help improve the performance of our .Net Desktop Application and am getting a high Thread Blocked % with no description of where it is happening. In frusteration, I created a basic .Net C# app with no controls at all and when I run the profiler it tells me 50% of the time this app too is thread blocked, what the heck? What is this telling me, should I ignore this value or what?




Thanks,

Jeff

Image
jefflundstrom
 
Posts: 2
Joined: Wed Apr 22, 2009 6:20 pm

Postby AndrewH » Thu Apr 23, 2009 10:59 am

'Thread blocked' is the time a thread spends inactive, waiting to be woken up (eg, because it is waiting for IO to complete, some user interaction or for a lock to be acquired). It's not time spent running on the CPU and is often not very interesting in terms of performance, so you can select 'CPU time' to eliminate this time from the results. You can also use the thread drop down to focus on individual threads.

In this case, I think you're seeing one of the garbage collection threads waiting to be activated. A top-level 'thread blocked' like this indicates a sleeping .NET thread that isn't running any .NET code at all.
Andrew Hunter
Software Developer
Red Gate Software Ltd.
AndrewH
 
Posts: 134
Joined: Thu Aug 17, 2006 3:44 pm

Re:

Postby jefflundstrom » Thu Apr 23, 2009 12:56 pm

Thanks Andrew, that is what I figured, just wanted to make sure I was not setting up the profiler wrong or something.

Thanks again for getting back to me so quick!

Jeff
jefflundstrom
 
Posts: 2
Joined: Wed Apr 22, 2009 6:20 pm


Return to ANTS Profiler Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests