Skip to content

Make appropriate GC environment variables available in runtimeconfig.json #166

Closed

Description

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

Activity

  1. ghost added
    api-suggestionEarly API idea and discussion, it is NOT ready for implementation
    on Nov 21, 2019
  2. removed
    untriagedNew issue has not been triaged by the area owner
    on Jan 8, 2020
  3. added this to the 5.0 milestone on Jan 8, 2020
  4. self-assigned this
    on Mar 26, 2020
  5. mangod9 commented on Jul 24, 2020

    @mangod9
    Member

    @cshung it appears LargePages is enabled in runtimeconfig, but other settings were not? Do we plan to add them in 5?

  6. cshung commented on Jul 27, 2020

    @cshung
    Contributor

    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:

    1. Decide on the list of configurations to be exposed. The full list of configurations that the GC uses is already specified in the table.
    2. Decide on the names that we will use for those we wanted to expose, and
    3. 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?

  7. mangod9 commented on Jul 27, 2020

    @mangod9
    Member

    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

  8. Maoni0 commented on Jul 27, 2020

    @Maoni0
    Member

    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")                        \
    
  9. ghost locked as resolved and limited conversation to collaborators on Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api-suggestionEarly API idea and discussion, it is NOT ready for implementationarea-GC-coreclr

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions