I made a memory dump of my network asynchronous application and walked through it with such a great utility like DebugDiag 2 Analysis . She gave an error and a warning, here are their contents:
Error:
In NetworkApplication.DMP GC is running in this process. The thread that triggered the GC is 330.
Warning:
This thread is waiting for .net garbage collection to finish. Thread 330 triggered the garbage collection. It is not a problem. The following threads have a pre-emptive GC disabled 330.
89.45% of threads blocked (534 threads).
Recommendations for correction, which gave tulza:
Error:
When a GC is running, it may be inaccurate. Also, it is not a problematic thread. Too many garbage collections. Too many of them. ASP.NET Case Study: Highly Acceptable.
Warning:
GC Disabled GC to run. Review the blog .NET .
Accordingly, the application is asynchronous and runs on ThreadPool threads with default settings. Version .NET: 4.6.2 x64 , translated for better performance RyuJIT , which in the first versions did not work very well. Maybe this is even a plus, because in this version of the framework, new methods for managing the garbage collector are available. OS: Windows Server 2012 r2 x64 .
Question: In general, how can a GC fight in this case (when it starts to "втыкать" in a childish way)? What needs to be optimized? What advice you can give or how you personally fought with similar problems (it is also interesting to learn from someone else’s experience).
ps to cite any sample code is irrational, the application is large, a lot of code