You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make appropriate GC environment variables available in runtimeconfig.json #166
A few GC environment variables have no runtimeconfig.json equivalent.
This proposal is to add new runtimeconfig.json settings with the same effect as existing environment variables.
Proposed new settings:
"System.GC.CpuGroup": Same as COMPlus_GCCpuGroup
"System.GC.HighMemoryPercent": Same as COMPlus_GCHighMemPercent
"System.GC.LargePages": Same as COMPlus_GCLargePages
"System.GC.HeapAffinitizeRanges": Same as COMPlus_GCHeapAffinitizeRanges
My commit 44ed52a introduced in PR #34797 provided the capability to enable a configuration to be read from runtimeconfig.json simply by adding the expected name in the third column of the gcconfig table like this:
BOOL_CONFIG (GCCpuGroup, "GCCpuGroup", NULL, false, "Enables CPU groups in the GC") \
BOOL_CONFIG (GCLargePages, "GCLargePages", "System.GC.LargePages", false, "Enables using Large Pages in the GC") \
INT_CONFIG (HeapVerifyLevel, "HeapVerify", NULL, HEAPVERIFY_NONE, "When set verifies the integrity of the managed heap on entry and exit of each GC") \
This makes exposing a configuration through runtimeconfig.json an easy task. This only three things we need to do are:
Decide on the list of configurations to be exposed. The full list of configurations that the GC uses is already specified in the table.
Decide on the names that we will use for those we wanted to expose, and
Make sure the documentation is up to date, the last column of the table already described the configuration, we just needed to expand on them making sure readers will understand it.
@Maoni0, can you please help with the first two items?
These are specifically called out in the original comment:
"System.GC.CpuGroup": Same as COMPlus_GCCpuGroup
"System.GC.HighMemoryPercent": Same as COMPlus_GCHighMemPercent
"System.GC.LargePages": Same as COMPlus_GCLargePages
"System.GC.HeapAffinitizeRanges": Same as COMPlus_GCHeapAffinitizeRanges
all 4 mentioned at the top should be exposed via runtimejson; I'm fine with the names suggested.
the ones you added to specify SOH/LOH/POH separately for hardlimit should also be exposed, following the same naming convention - System.GC.HeapHardLimitSOH, System.GC.HeapHardLimitSOHPercent, etc.
also I just noticed..it's very odd that GCHeapHardLimit itself is not exposed via runtimejson but GCHeapHardLimitPercent is. they should both be in runtimejson (I thought they were?).
INT_CONFIG (GCHeapHardLimit, "GCHeapHardLimit", NULL, 0, "Specifies a hard limit for the GC heap") \
INT_CONFIG (GCHeapHardLimitPercent, "GCHeapHardLimitPercent", "System.GC.HeapHardLimitPercent", 0, "Specifies the GC heap usage as a percentage of the total memory") \
Activity
mangod9 commentedon Jul 24, 2020
@cshung it appears LargePages is enabled in runtimeconfig, but other settings were not? Do we plan to add them in 5?
cshung commentedon Jul 27, 2020
My commit 44ed52a introduced in PR #34797 provided the capability to enable a configuration to be read from
runtimeconfig.jsonsimply by adding the expected name in the third column of the gcconfig table like this:runtime/src/coreclr/src/gc/gcconfig.h
Lines 78 to 80 in 824d770
This makes exposing a configuration through
runtimeconfig.jsonan easy task. This only three things we need to do are:@Maoni0, can you please help with the first two items?
mangod9 commentedon Jul 27, 2020
These are specifically called out in the original comment:
"System.GC.CpuGroup": Same as
COMPlus_GCCpuGroup"System.GC.HighMemoryPercent": Same as
COMPlus_GCHighMemPercent"System.GC.LargePages": Same as
COMPlus_GCLargePages"System.GC.HeapAffinitizeRanges": Same as
COMPlus_GCHeapAffinitizeRangesMaoni0 commentedon Jul 27, 2020
all 4 mentioned at the top should be exposed via runtimejson; I'm fine with the names suggested.
the ones you added to specify SOH/LOH/POH separately for hardlimit should also be exposed, following the same naming convention -
System.GC.HeapHardLimitSOH,System.GC.HeapHardLimitSOHPercent, etc.also I just noticed..it's very odd that GCHeapHardLimit itself is not exposed via runtimejson but GCHeapHardLimitPercent is. they should both be in runtimejson (I thought they were?).