Options

Waiting Synchronisation

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

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    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.
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    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.
  • Options
    Thank you Brian! Your answer was very helpful!

    Cheers,
    Cesar
Sign In or Register to comment.