Allow to disable GC compaction #111037
Unanswered
fabianoliver
asked this question in
Ideas
Replies: 2 comments 5 replies
-
Automatic compaction of the heap is the primary reason object allocations are just a pointer bump most of the time. Disabling it or not always doing it will likely affect performance in non-trivial ways. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Perhaps you meant disabling compaction for Gen 2 and LOH specifically? The collection process in generational GCs is naturally compacting as the surviving objects are relocated to an older generation. My understanding is that there is no way to not "compact" ephemeral heaps as surviving objects are placed sequentially in e.g. Gen1. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
As far as I know, compaction is typically the largest (often only?) contributor to stop-the-world pause times in modern GCs, presumably .NET GC included. Would it be feasible to
With the overall aim/hope this might enable users to effectively reduce GC pauses at the cost of various other metrics?
I'm curious if that would be arelatively low effort means to have a - probably not ideal, but still pauseless GC that might be net/net beneficial for certain kinds of applications (eg financial space/trading, gaming, etc.)
If this feature would be technically possible, I wonder what the typical trade-offs of enabling such a setting would be. I'd assume lower throughput and somewhat higher overall consumption - would any other metric likely be affected?
Motivation
I somehow expect this isn't possible, or my line of thinking here is wrong, but I'd be curious to hear thoughts on this!
Beta Was this translation helpful? Give feedback.
All reactions