Waiting Synchronisation

Code profiling for .NET Developers

Moderators: Luke Jefferson, StephenC, Alex.Davies, AndrewH, melvyn.harbour, Laura Morley

Waiting Synchronisation

Postby cesar.fernandes » Tue Aug 09, 2011 4:07 pm

Hi all,

during a profile of an IIS ASP.Net application, most of the time was spent in "waiting synchronisation". Investigating this time, most of it was due to WaitAny.

Therefore, I was wondering if this event could have been caused by the IIS worker threads waiting for requests to come in. Is it possible that high waiting synchronisation could mean idle worker threads?

Thank you
cesar.fernandes
 
Posts: 3
Joined: Tue Aug 09, 2011 4:01 pm
Location: Brasil

Postby Brian Donahue » Tue Aug 09, 2011 5:56 pm

I'm not an IIS expert by any means but I'm not sure where else you could ask a question like this.

Usually, waiting for synchronization usually means one thread started a worker thread to do something and it's waiting for that something to finish. When it comes to IIS, it's probably more likely adding up all of the time between BeginRequest and EndRequest, which is the difference between the time that a request came in and the time it was satisfied. A slow network connection may be to blame.

A bunch of threads running listeners are going to show up in Performance Profiler as "Waiting for IO to complete", so I think that's the metric you're looking for.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Wed Aug 10, 2011 9:56 am

Just checked the source code and found that socket "listen" operations are not detoured. Other operations like Accept are, so I assume you will only see "Thread Blocked" for the duration of an Accept Recv or RecvFrom.

Looks like a sample web app of mine spends most of its' time "sleeping" so I would assume that's the time spent doing listening on the socket.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby cesar.fernandes » Wed Aug 10, 2011 1:09 pm

Thank you Brian! Your answer was very helpful!

Cheers,
Cesar
cesar.fernandes
 
Posts: 3
Joined: Tue Aug 09, 2011 4:01 pm
Location: Brasil


Return to ANTS Performance Profiler 6

Who is online

Users browsing this forum: No registered users and 1 guest