-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Allow user to specify independent heap hard limits for different object heaps. #37166
Allow user to specify independent heap hard limits for different object heaps. #37166
Conversation
Tagging subscribers to this area: @Maoni0 |
if POH is supposed to be 0, you'll need to make sure for large pages, the POH segments are not allocated with large pages. that's in |
I would suggest to change the env vars in your commit's description to
the casing is important on linux. another thing is we should also support percentages like hardlimit. |
5634f20
to
fa5cc3c
Compare
fa5cc3c
to
c755c4c
Compare
c755c4c
to
31c1687
Compare
d49691f
to
904d856
Compare
904d856
to
f671b0d
Compare
f671b0d
to
fa5579f
Compare
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!
With the per object heap committed memory tracking available (#36731), now we can provide the configuration switches so that the user can specify exactly how much they want to limit per object heap.
Here are the rules:
If the user specifies any one of the
COMPLUS_GCHeapHardLimitSOH
,COMPLUS_GCHeapHardLimitLOH
orCOMPLUS_GCHeapHardLimitPOH
, he or she must also specify the others (with the exception ofCOMPLUS_GCHeapHardLimitPOH
, which is allowed to be unspecified and assume a default value of 0).If the user did not specifies any one of the
COMPLUS_GCHeapHardLimitSOH
,COMPLUS_GCHeapHardLimitLOH
orCOMPLUS_GCHeapHardLimitPOH
, then we considerCOMPLUS_GCHeapHardLimitSOHPercent
,COMPLUS_GCHeapHardLimitLOHPercent
orCOMPLUS_GCHeapHardLimitPOHPercent
. These are the percentage equivalents of the above. A value of 1 for COMPLUS_GCHeapHardLimitSOH means we will use 1% of total physical memory for SOH. An additional validation rule is that these percentages should not less than or equal to 0, or greater than or equal to 100. The sum of them should not be greater than or equal to 100 as well.COMPLUS_GCHeapHardLimit
is also specified, then it will be ignored. Any allocation that is done by the GC which is not associated with any object heaps (such as the card table) will not be checked against any limit. (It is assumed that they are insignificant compared with user objects).I haven't tested it thoroughly yet. I will make sure I include large page in my tests.