Perfview, BLOCKED_TIME and Pause in Garbage Collection

136 Views Asked by At

I am trying to improve performance on a single threaded computationally intensive / low IO .NET 4.7.1 program by analyzing it in perfview, running on Windows Server 2016 in AWS on a r5.8xlarge instance (32 core, 256GB RAM).

I took a 700s sample of my process in perfview (including the -threadtime flag), and I see the following results for GC GC rollup By Generation

along with these > 200ms pause events GC Events by Time

Looking at the first slow GC Index 149056, with a pause time of 12,270.571ms, does that mean that my managed code is literally stopped between 2,522.622ms and 14,793.193ms? (=2522.622+12270.571) while I'm waiting for Gen 2 GC to finish?

If that's true, when I look at Thread Time stacks over that time window, and I look at BLOCKED_TIME only for my main thread (using IncPats), I see many different functions that wind up in BLOCKED_TIME.

Thread Time Stacks

I've redacted the lines that are my functions that wind up calling clr!JIT_New, but there are about 20 different ones.

If the managed threads are paused for GC during this time window, then wouldn't there just be a single call from my code that winds up in BLOCKED_TIME?

0

There are 0 best solutions below