How to know if I have to do memory profiling too?

79 Views Asked by At

I currently do CPU sampling of an ASP.NET Core application where I send huge number of requests(> 500K) to it. I see that the peak working set of the application is around ~300 MB which in my opinion is not huge considering the number of requests being made to the application. But what I have been observing is huge drop in requests per second when I enable certain pieces of functionality in my application.

Question: Should I do memory profiling too? I ask this because even though the peak working set is ~300MB, there could be large number of short lived objects that could be created & collected by GC and since work by GC also counts as CPU, should I do memory profiling too to see if I allocate too much?

1

There are 1 best solutions below

0
On

I will answer this question myself based on new information that I found out.

This is based on the tool PerfView, which provides information about GC and allocations. enter image description here

When you open the GCStats view navigate the links to the process you care and you should see information like below: enter image description here

Notice that view has the information has the % CPU Time spent Garbage Collecting. If you see this to be > 5% then it should be a cause of concern and you should start memory profiling.