I am looking at my performance profile of one of my slowest requests, and I see an AWAIT_TIME of more than 6 seconds, but I am not able to get any more information regarding it. How do I figure out what exactly the process is "waiting on"?
Profiling is nothing but a process of measuring the performance analysis of an application. It is usually done to ensure that the application is stable enough and can sustain heavy traffic.
With Application Insights Profiler, you can capture and view performance traces for your application in all these dynamic situations, automatically at-scale, without negatively affecting your end users.
From Azure's documentation:
AWAIT_TIME
indicates the code is waiting for another task to complete. This typically happens with C# 'await' statement. When the code does a C# 'await', the thread unwinds and returns control to the thread-pool, and there is no thread that is blocked waiting for the 'await' to finish. However, logically the thread that did the await is 'blocked' waiting for the operation to complete. The AWAIT_TIME
indicates the blocked time waiting for the task to complete.+
BLOCKED_TIME
indicates the code is waiting for another resource to be available, such as waiting for a synchronization object, waiting for a thread to be available, or waiting for a request to finish.
So it's waiting on something necessary to continue with processing. We have had the same problem of long AWAIT_TIME
with file uploads and it turned out the request was waiting for the Request's stream to be read (ReadAsMultiPartAsync()
for us)... If you look at the code in RecASPRequest
and _RtlUserThreadStart
, you'll probably the culprit...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With