开发者

GC in Workstation mode in ASP.NET app

I'm looking at dumps and I see

mscorwks!WKS::GCHeap::GarbageCollectGeneration+0x1a9.

If I understand it is GC doing GarbageCollection in Workstation Mode? I see other threads are waiting on mscorwks!WKS::GCHeap::WaitUntilGCComplete+0x34.

Does that 开发者_如何学Gomean I run with workstation concurent=false mode of GC? I know that this server is one processor with one core. Should I change to concurent=true for ASP.NET App?

If I add another processor will GC automatically run in Server mode?


Concurrent GC is meant for interactive (UI) applications. For server applications such as ASP.NET, non-concurrent GC should be preferred. As per MSDN documentation, ASP.NET choose what is the best as per system config and you don't have alter this settings.

Go through garbage collection documentation on MSDN for more information. As to answer, your last part of question - generally, CLR Host can override configured GC mode value. As per MSDN doc, ASP.NET will choose server GC for multi-processor machines. So yes, if you add one more processor, you should see your ASP.NET app using server mode GC.

On side note, probably reliable way to find out the GC mode is using GCSettings.IsServerGC property. Similarly, GCSettings.LatencyMode will tell you if its concurrent GC or not. For example, in workstation mode, Interactive value indicates concurrent GC.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜