Experience using gcServer=“true” to set garbage collector for .NET

后端 未结 3 1816
梦毁少年i
梦毁少年i 2020-12-29 23:50

Has someone used a configuration enabling the garbage collector optimized for multi-processor machines using Aspnet.config with :



        
3条回答
  •  时光取名叫无心
    2020-12-30 00:30

    (very old question, I know, but I thought to add this anyway)

    There's one major difference between Server GC and Concurrent GC: the Server GC has one thread per processor and suspends the threads on that processor when doing a collection, the server Concurrent GC thread runs in parallel with the other threads, i.e., no suspension. See this MSDN article for more info and more subtle differences.

    Depending on the time a cycle takes, this can make a rather big difference in user responsiveness of your application, so choose wisely. In case of ASP.NET, which does not have a UI, Server GC is the better (and default) option.

提交回复
热议问题