GC HeapHardLimit functionality within .NET Framework 4.8 #936
mthalman
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As part of a recent .NET Framework Container update, we have ported functionality of specifying the heap hard limit similar to what is available on .NET Core.
There is a possible unexpected side-effect due to this new functionality, in that the heap hard limit defaults to 75% of the total available memory, the GC is likely to commit slightly more than what was done previously, hence the process commit size might be larger. This behavior is more pronounced when running multiple processes within the same container.
Theoretically, there should be little to no consequences of much impact, due to how the GC is settings are configured. When the GC detects it's running low on memory, it should collect more aggressively, in order to preserve free space and avoid running out of memory. That said if multiple processes are saturating the memory within the container, increased commit size of each process might lead to a possibility of OOM failures. Since the GC now uses the available memory for the container to determine the minimum heap sizes (and other internal data structures), if the available memory for the container is large you might notice higher commit sizes. This is particularly prominent if the container memory restriction is on the higher side, with multiple managed process launched within it.
Here are some options to affect GC memory settings:
available container memory
/ # of concurrent processes].NOTE:
Mitigation
If you are adversely affected by this update, you can remove the update patch from your container image by including the following instruction in your Dockerfile:
This effectively uninstalls this update but preserves all other updates, including the latest security fixes.
Beta Was this translation helpful? Give feedback.
All reactions