Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Garbage Collector mode
MatthewSteeples
#1 Posted : Monday, April 13, 2020 8:20:06 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/28/2014(UTC)
Posts: 105
Location: United Kingdom

Thanks: 6 times
Was thanked: 14 time(s) in 12 post(s)
Apologies if this has already been considered, but I wondered if you'd done any profiling on using Server GC as opposed to Workstation GC for the NCrunch processes?

There are some details in this blog post from Microsoft on the offchance you're not already aware of it! The very brief summary is that it trades memory for CPU time, by doing larger collections more infrequently (so short lived items have more of a chance of not being promoted to Gen2).
Remco
#2 Posted : Tuesday, April 14, 2020 12:08:45 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,064

Thanks: 788 times
Was thanked: 1026 time(s) in 976 post(s)
Hi, thanks for posting.

It's hard for me to give a straight answer on this, because over the years we've accumulated a number of different hosting implementations for all the variations platforms and framework versions we work with, and there are differences between them.

I think in some cases we may be using the server GC, but most consistently we've been careful to disable concurrent GC because of previous problems with heap corruption under some versions of .NET.

This is an area we need to be extremely careful when we make changes, because it can result in strange runtime exceptions appearing inconsistently in some environments. MS tend to treat the runtime and GC as being 100% stable and reliable with their release process, but my observation is that this is simply not the case. Runtime issues caused by the platform are extremely difficult to troubleshoot so we try to avoid them whenever possible.

When working on a typical ASP.NET or runtime application under .NET, usually these are settings you would freely adjust yourself to get the best result. If it caused instability or unexpected results, you'd just switch it back.

With the NCrunch project, it's not the same. When we change GC settings, it affects thousands of people working on a wide range of software in extremely complex environments. We can't guarantee that the result they see will be the same as ours, and if they raise issues with us it's very unlikely we'll be able to promptly identify the root cause of them.

So in this area we tend to prioritise stability over performance. If it isn't broken, we're not going to fix it.
1 user thanked Remco for this useful post.
MatthewSteeples on 5/7/2020(UTC)
MatthewSteeples
#3 Posted : Thursday, May 7, 2020 12:19:06 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/28/2014(UTC)
Posts: 105
Location: United Kingdom

Thanks: 6 times
Was thanked: 14 time(s) in 12 post(s)
Thanks for the detail. Makes perfect sense and stability is always preferable over performance. It's better to be slower and right than faster and wrong!
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.024 seconds.