Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does AWAIT_TIME exactly mean in the Azure profiler?

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"?

part of the profiling "hot path"

like image 330
Riz Avatar asked Jul 24 '17 20:07

Riz


People also ask

What is profiler in Azure?

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.

What is application Insight Profiler?

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.


1 Answers

From Azure's documentation:

Waiting (AWAIT_TIME)

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

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...

like image 64
dstj Avatar answered Oct 08 '22 00:10

dstj