-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the fix to make use of the heap hard limit instead of the region range while using large pages. #68629
Conversation
…n range while using the large pages
Tagging subscribers to this area: @dotnet/gc Issue DetailsSummaryAddresses #54616 for which, if large pages are enabled, we are setting the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
what kind of perf testing was done on this? I believe using the hardlimit is way too strict here and you will end up not being able to realistically allocate the hardlimit amount of memory. in segment cases we actually commit 2x the limit the user specifies for SOH and LOH because we cannot predict if objects will be large or small. with regions we certainly are working toward getting rid of this distinction but it would require some thoughts on what our policy should be. |
There was no perf testing / tuning done for this PR. I can work on this after discussing the policy here. |
This is starting to show up on our stale PR radar - what are the next steps to proceed here? |
@trylek - closing for now. Will re-open when we have a more concrete solution. |
Without my change, we are now committing 2 x the heap hard limit based on the gc_heap::regions_range = (size_t)GCConfig::GetGCRegionRange();
if (gc_heap::regions_range == 0)
{
if (gc_heap::heap_hard_limit)
{
gc_heap::regions_range = 2 * gc_heap::heap_hard_limit;
}
else
{
gc_heap::regions_range = max(((size_t)256 * 1024 * 1024 * 1024), (size_t)(2 * gc_heap::total_physical_mem));
}
gc_heap::regions_range = align_on_page(gc_heap::regions_range);
} |
Summary
If large pages are enabled, we set the
reserve_size
of regions to be equivalent to that of the heap hard limit rather than the default range.