From 20be49cece3f6362bcd71121a750518cd975ff4f Mon Sep 17 00:00:00 2001 From: Genevieve Warren Date: Wed, 20 Nov 2019 17:29:24 -0800 Subject: [PATCH 1/6] feedback from maoni on pr #15844 --- .../core/run-time-config/garbage-collector.md | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/docs/core/run-time-config/garbage-collector.md b/docs/core/run-time-config/garbage-collector.md index 0b7f0db75eff7..02f7fcdc2c509 100644 --- a/docs/core/run-time-config/garbage-collector.md +++ b/docs/core/run-time-config/garbage-collector.md @@ -57,7 +57,7 @@ For more information about some of these settings, see the [Middle ground betwee - Limits the number of heaps created by the garbage collector. - Applies to server garbage collection (GC) only. -- If GC thread/processor affinity is enabled, which is the default, the heap count setting affinitizes *number* GC heaps/threads to the first *number* processors. (Use the affinitize mask or affinitize ranges settings to specify exactly which processors to affinitize.) +- If GC processor affinity is enabled, which is the default, the heap count setting affinitizes *number* GC heaps/threads to the first *number* processors. (Use the affinitize mask or affinitize ranges settings to specify exactly which processors to affinitize.) - If GC thread/processor affinity is disabled, this setting limits the number of GC heaps. - For more information, see the [GCHeapCount remarks](../../framework/configure-apps/file-schema/runtime/gcheapcount-element.md#remarks). @@ -67,17 +67,20 @@ For more information about some of these settings, see the [Middle ground betwee | **Environment variable** | `COMPlus_GCHeapCount` | *number* | .NET Core 3.0 | | **app.config for .NET Framework** | [GCHeapCount](../../framework/configure-apps/file-schema/runtime/gcheapcount-element.md) | *number* | 4.6.2 | +> [!TIP] +> If you're setting the option in *runtimeconfig.json*, specify a decimal value. If you're setting the option as an environment variable, specify a hexadecimal value. For example, to limit the number of heaps to 16, the values would be 16 for the JSON file and 10 for the environment variable. + ### System.GC.HeapAffinitizeMask/COMPlus_GCHeapAffinitizeMask - Specifies the exact processors that garbage collector threads should use. - If processor affinity is disabled by setting `System.GC.NoAffinitize` to `true`, this setting is ignored. - Applies to server garbage collection (GC) only. -- The decimal value is a bit mask that defines the processors that are available to the process. For example, a decimal value of 1023 is equivalent to 0x3FF in hexadecimal notation and 0011 1111 1111 in binary notation. This specifies that the first 10 processors are to be used. To specify the next 10 processors, that is, processors 10-19, specify a decimal value of 1047552, which is equivalent to 0xFFC00 in hexadecimal and 1111 1111 1100 0000 0000 in binary. +- The value is a bit mask that defines the processors that are available to the process. For example, a decimal value of 1023 (or a hexadecimal value of 0x3FF if you're using the environment variable) is 0011 1111 1111 in binary notation. This specifies that the first 10 processors are to be used. To specify the next 10 processors, that is, processors 10-19, specify a decimal value of 1047552 (or a hexadecimal value of 0xFFC00), which is equivalent to a binary value of 1111 1111 1100 0000 0000. | | Setting name | Values | Version introduced | | - | - | - | - | | **runtimeconfig.json** | `System.GC.HeapAffinitizeMask` | *decimal value* | .NET Core 3.0 | -| **Environment variable** | `COMPlus_GCHeapAffinitizeMask` | *decimal value* | .NET Core 3.0 | +| **Environment variable** | `COMPlus_GCHeapAffinitizeMask` | *hexadecimal value* | .NET Core 3.0 | | **app.config for .NET Framework** | [GCHeapAffinitizeMask](../../framework/configure-apps/file-schema/runtime/gcheapaffinitizemask-element.md) | *decimal value* | 4.6.2 | ### System.GC.GCHeapAffinitizeRanges/COMPlus_GCHeapAffinitizeRanges @@ -91,8 +94,8 @@ For more information about some of these settings, see the [Middle ground betwee | | Setting name | Values | Version introduced | | - | - | - | - | -| **runtimeconfig.json** | `System.GC.GCHeapAffinitizeRanges` | Comma-separated list of processor numbers or ranges of processor numbers.
Unix example: "1-10,12,50-52,70"
Windows example: "0:1-10,0:12,1:50-52,1:70" | .NET Core 1.0 | -| **Environment variable** | `COMPlus_GCHeapAffinitizeRanges` | Comma-separated list of processor numbers or ranges of processor numbers.
Unix example: "1-10,12,50-52,70"
Windows example: "0:1-10,0:12,1:50-52,1:70" | .NET Core 1.0 | +| **runtimeconfig.json** | `System.GC.GCHeapAffinitizeRanges` | Comma-separated list of processor numbers or ranges of processor numbers.
Unix example: "1-10,12,50-52,70"
Windows example: "0:1-10,0:12,1:50-52,1:70" | .NET Core 3.0 | +| **Environment variable** | `COMPlus_GCHeapAffinitizeRanges` | Comma-separated list of processor numbers or ranges of processor numbers.
Unix example: "1-10,12,50-52,70"
Windows example: "0:1-10,0:12,1:50-52,1:70" | .NET Core 3.0 | | **app.config for .NET Framework** | N/A | N/A | N/A | ### COMPlus_GCCpuGroup @@ -103,7 +106,7 @@ For more information about some of these settings, see the [Middle ground betwee - Applies to server garbage collection (GC) on 64-bit Windows operation systems only. - Default: Disabled (0). -- For more information, see [Maoni Stephens' blog entry](https://devblogs.microsoft.com/dotnet/making-cpu-configuration-better-for-gc-on-machines-with-64-cpus/). +- For more information, see [Making CPU configuration better for GC on machines with > 64 CPUs](https://devblogs.microsoft.com/dotnet/making-cpu-configuration-better-for-gc-on-machines-with-64-cpus/) on Maoni Stephens' blog. | | Setting name | Values | Version introduced | | - | - | - | - | @@ -111,9 +114,12 @@ For more information about some of these settings, see the [Middle ground betwee | **Environment variable** | `COMPlus_GCCpuGroup` | 0 - disabled
1 - enabled | .NET Core 1.0 | | **app.config for .NET Framework** | [GCCpuGroup](../../framework/configure-apps/file-schema/runtime/gccpugroup-element.md) | `false` - disabled
`true` - enabled | | +> [!NOTE] +> To configure the common language runtime (CLR) to also distribute threads from the thread pool across all CPU groups, enable the [](../../framework/configure-apps/file-schema/runtime/thread-useallcpugroups-element.md) option. For .NET Core apps, you can enable this option by setting the value of the `COMPlus_Thread_UseAllCpuGroups` environment variable to `1`. + ### System.GC.NoAffinitize/COMPlus_GCNoAffinitize -- Specifies whether to affinitize garbage collection threads with processors. That is, whether to create a dedicated heap, GC thread, and background GC thread (if background garbage collection is enabled) for each processor. +- Specifies whether to *affinitize* garbage collection threads with processors. To affinitize a GC thread means that it can only run on its specific CPU. A heap is created for each GC thread. - Applies to server garbage collection (GC) only. - Default: Affinitize garbage collection threads with processors (`false`). @@ -125,13 +131,15 @@ For more information about some of these settings, see the [Middle ground betwee ### System.GC.HeapHardLimit/COMPlus_GCHeapHardLimit -- Specifies the maximum commit size, in bytes, for the GC heap. -- The value can range from 0 to 18,446,744,073,709,551,615. +- Specifies the maximum commit size, in bytes, for the GC heap and GC bookkeeping. | | Setting name | Values | Version introduced | | - | - | - | - | | **runtimeconfig.json** | `System.GC.HeapHardLimit` | *decimal value* | .NET Core 3.0 | -| **Environment variable** | `COMPlus_GCHeapHardLimit` | *decimal value* | .NET Core 3.0 | +| **Environment variable** | `COMPlus_GCHeapHardLimit` | *hexadecimal value* | .NET Core 3.0 | + +> [!TIP] +> If you're setting the option in *runtimeconfig.json*, specify a decimal value. If you're setting the option as an environment variable, specify a hexadecimal value. For example, to specify a heap hard limit of 80,000 bytes, the values would be 80000 for the JSON file and 13880 for the environment variable. ### System.GC.HeapHardLimitPercent/COMPlus_GCHeapHardLimitPercent @@ -164,7 +172,7 @@ For more information about some of these settings, see the [Middle ground betwee | | Setting name | Values | Version introduced | | - | - | - | - | | **runtimeconfig.json** | N/A | N/A | N/A | -| **Environment variable** | `COMPlus_GCLargePages` | 0 - disabled
1 - enabled | .NET Core 1.0 | +| **Environment variable** | `COMPlus_GCLargePages` | 0 - disabled
1 - enabled | .NET Core 3.0 | | **app.config for .NET Framework** | N/A | N/A | N/A | ## Large objects @@ -179,6 +187,7 @@ For more information about some of these settings, see the [Middle ground betwee | - | - | - | - | | **runtimeconfig.json** | N/A | N/A | N/A | | **Environment variable** | `COMPlus_gcAllowVeryLargeObjects` | 1 - enabled
0 - disabled | .NET Core 1.0 | +| **app.config for .NET Framework** | [gcAllowVeryLargeObjects](../../framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element.md) | 1 - enabled
0 - disabled | .NET Framework 4.5 | ## Large object heap threshold @@ -190,6 +199,7 @@ For more information about some of these settings, see the [Middle ground betwee | - | - | - | - | | **runtimeconfig.json** | `System.GC.LOHThreshold` | *size in bytes* | .NET Core 1.0 | | **Environment variable** | `COMPlus_GCLOHThreshold` | *size in bytes* | .NET Core 1.0 | +| **app.config for .NET Framework** | GCLOHThreshold | *size in bytes* | .NET Framework 4.8 | ## Standalone GC @@ -201,4 +211,4 @@ For more information about some of these settings, see the [Middle ground betwee | | Setting name | Values | Version introduced | | - | - | - | - | | **runtimeconfig.json** | N/A | N/A | N/A | -| **Environment variable** | `COMPlus_GCName` | *string_path* | .NET Core 1.0 | +| **Environment variable** | `COMPlus_GCName` | *string_path* | .NET Core 2.0 | From 3e9deabb49a6569fe0f62d0966a597a13dc82bef Mon Sep 17 00:00:00 2001 From: Genevieve Warren Date: Wed, 20 Nov 2019 17:29:53 -0800 Subject: [PATCH 2/6] add new app.config setting file --- .../runtime/gclohthreshold-element.md | 55 +++++++++++++++++++ .../file-schema/runtime/index.md | 2 + .../file-schema/runtime/toc.yml | 2 + 3 files changed, 59 insertions(+) create mode 100644 docs/framework/configure-apps/file-schema/runtime/gclohthreshold-element.md diff --git a/docs/framework/configure-apps/file-schema/runtime/gclohthreshold-element.md b/docs/framework/configure-apps/file-schema/runtime/gclohthreshold-element.md new file mode 100644 index 0000000000000..3228ed53ca3fa --- /dev/null +++ b/docs/framework/configure-apps/file-schema/runtime/gclohthreshold-element.md @@ -0,0 +1,55 @@ +--- +title: GCLOHThreshold element +ms.date: 11/20/2019 +helpviewer_keywords: + - "GCLOHThreshold element" + - " element" +--- +# GCLOHThreshold element + +Specifies the threshold size, in bytes, that causes objects to go on the large object heap (LOH). + +[\](../configuration-element.md)\ +  [\](runtime-element.md)\ +    \ + +## Syntax + +```xml + +``` + +## Attributes + +|Attribute|Description| +|---------------|-----------------| +|`enabled`|Required attribute.

Specifies the threshold size that causes objects to go on the large object heap.| + +### enabled attribute + +|Value|Description| +|-----------|-----------------| +|`nnnn`|The threshold size, in bytes, that causes objects to go on the large object heap.| + +## Child elements + +None. + +## Parent elements + +|Element|Description| +|-------------|-----------------| +|`configuration`|The root element in every configuration file used by the common language runtime and .NET Framework applications.| +|`runtime`|Contains information about assembly binding and garbage collection.| + +## Remarks + +This setting was introduced in .NET Framework 4.8. + +## See also + +- [Run-time settings schema](index.md) +- [Configuration file schema](../index.md) +- [Fundamentals of garbage collection](../../../../standard/garbage-collection/fundamentals.md) +- [NET Core run-time config options for GC](../../../../core/run-time-config/garbage-collector.md) diff --git a/docs/framework/configure-apps/file-schema/runtime/index.md b/docs/framework/configure-apps/file-schema/runtime/index.md index e9739c2328ef8..75b97d345d845 100644 --- a/docs/framework/configure-apps/file-schema/runtime/index.md +++ b/docs/framework/configure-apps/file-schema/runtime/index.md @@ -44,6 +44,7 @@ Run-time settings are used by the common language runtime to configure applicati     [\](gccpugroup-element.md)\     [\](gcheapaffinitizemask-element.md)\     [\](gcheapcount-element.md)\ +    [\](gclohthreshold-element.md)\     [\](gcnoaffinitize-element.md)\     [\](gcserver-element.md)\     [\](generatepublisherevidence-element.md)\ @@ -100,6 +101,7 @@ Run-time settings are used by the common language runtime to configure applicati |[\](gccpugroup-element.md)|Specifies whether garbage collection supports multiple CPU groups.| |[\](gcheapaffinitizemask-element.md)|Defines the affinity between GC heaps and individual processors.| |[\](gcheapcount-element.md)|Specifies the number of heaps/threads to use for server garbage collection. | +|[\](gclohthreshold-element.md)|Specifies the threshold size that causes objects to go on the large object heap (LOH).| |[\](gcnoaffinitize-element.md)|Specifies whether or not to affinitize server GC threads with CPUs.| |[\](gcserver-element.md)|Specifies whether the common language runtime runs server garbage collection.| |[\](generatepublisherevidence-element.md)|Specifies whether the runtime uses code access security (CAS) publisher policy.| diff --git a/docs/framework/configure-apps/file-schema/runtime/toc.yml b/docs/framework/configure-apps/file-schema/runtime/toc.yml index 29dc539b9bb91..7d83f1556f9a8 100644 --- a/docs/framework/configure-apps/file-schema/runtime/toc.yml +++ b/docs/framework/configure-apps/file-schema/runtime/toc.yml @@ -66,6 +66,8 @@ href: gcheapaffinitizemask-element.md - name: element href: gcheapcount-element.md + - name: element + href: gclohthreshold-element.md - name: element href: gcnoaffinitize-element.md - name: element From b01907b6728d030a6022029c6773a38b027f87bb Mon Sep 17 00:00:00 2001 From: Genevieve Warren Date: Wed, 20 Nov 2019 17:49:01 -0800 Subject: [PATCH 3/6] add more info about decimal/hexadecimal --- .../core/run-time-config/garbage-collector.md | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/docs/core/run-time-config/garbage-collector.md b/docs/core/run-time-config/garbage-collector.md index 02f7fcdc2c509..ca7b256549be0 100644 --- a/docs/core/run-time-config/garbage-collector.md +++ b/docs/core/run-time-config/garbage-collector.md @@ -14,6 +14,7 @@ Settings are arranged into groups on this page. The settings within each group a > > - These settings can also be changed dynamically by the app as it's running, so any run-time settings you set may be overridden. > - Some settings, such as [latency level](../../standard/garbage-collection/latency.md), are typically set only through the API at design time. Such settings are omitted from this page. +> - For number values, use decimal notation for settings in the *runtimeconfig.json* file and hexadecimal notation for environment variable settings. ## Flavors of garbage collection @@ -57,14 +58,14 @@ For more information about some of these settings, see the [Middle ground betwee - Limits the number of heaps created by the garbage collector. - Applies to server garbage collection (GC) only. -- If GC processor affinity is enabled, which is the default, the heap count setting affinitizes *number* GC heaps/threads to the first *number* processors. (Use the affinitize mask or affinitize ranges settings to specify exactly which processors to affinitize.) +- If GC processor affinity is enabled, which is the default, the heap count setting affinitizes `n` GC heaps/threads to the first `n` processors. (Use the affinitize mask or affinitize ranges settings to specify exactly which processors to affinitize.) - If GC thread/processor affinity is disabled, this setting limits the number of GC heaps. - For more information, see the [GCHeapCount remarks](../../framework/configure-apps/file-schema/runtime/gcheapcount-element.md#remarks). | | Setting name | Values | Version introduced | | - | - | - | - | -| **runtimeconfig.json** | `System.GC.HeapCount` | *number* | .NET Core 3.0 | -| **Environment variable** | `COMPlus_GCHeapCount` | *number* | .NET Core 3.0 | +| **runtimeconfig.json** | `System.GC.HeapCount` | *decimal value* | .NET Core 3.0 | +| **Environment variable** | `COMPlus_GCHeapCount` | *hexadecimal value* | .NET Core 3.0 | | **app.config for .NET Framework** | [GCHeapCount](../../framework/configure-apps/file-schema/runtime/gcheapcount-element.md) | *number* | 4.6.2 | > [!TIP] @@ -144,12 +145,14 @@ For more information about some of these settings, see the [Middle ground betwee ### System.GC.HeapHardLimitPercent/COMPlus_GCHeapHardLimitPercent - Specifies the GC heap usage as a percentage of the total memory. -- Example value: 25 | | Setting name | Values | Version introduced | | - | - | - | - | -| **runtimeconfig.json** | `System.GC.HeapHardLimitPercent` | *percentage* | .NET Core 3.0 | -| **Environment variable** | `COMPlus_GCHeapHardLimitPercent` | *percentage* | .NET Core 3.0 | +| **runtimeconfig.json** | `System.GC.HeapHardLimitPercent` | *decimal value* | .NET Core 3.0 | +| **Environment variable** | `COMPlus_GCHeapHardLimitPercent` | *hexadecimal value* | .NET Core 3.0 | + +> [!TIP] +> If you're setting the option in *runtimeconfig.json*, specify a decimal value. If you're setting the option as an environment variable, specify a hexadecimal value. For example, to limit the heap usage to 30%, the values would be 30 for the JSON file and 1E for the environment variable. ### System.GC.RetainVM/COMPlus_GCRetainVM @@ -197,9 +200,12 @@ For more information about some of these settings, see the [Middle ground betwee | | Setting name | Values | Version introduced | | - | - | - | - | -| **runtimeconfig.json** | `System.GC.LOHThreshold` | *size in bytes* | .NET Core 1.0 | -| **Environment variable** | `COMPlus_GCLOHThreshold` | *size in bytes* | .NET Core 1.0 | -| **app.config for .NET Framework** | GCLOHThreshold | *size in bytes* | .NET Framework 4.8 | +| **runtimeconfig.json** | `System.GC.LOHThreshold` | *decimal value* | .NET Core 1.0 | +| **Environment variable** | `COMPlus_GCLOHThreshold` | *hexadecimal value* | .NET Core 1.0 | +| **app.config for .NET Framework** | [GCLOHThreshold](../../framework/configure-apps/file-schema/runtime/gclohthreshold-element.md) | *size in bytes* | .NET Framework 4.8 | + +> [!TIP] +> If you're setting the option in *runtimeconfig.json*, specify a decimal value. If you're setting the option as an environment variable, specify a hexadecimal value. For example, to set a threshold size of 500,000,000 bytes, the values would be 500000000 for the JSON file and 1F4 for the environment variable. ## Standalone GC From 0e25678eab83bc1035889a56dffc568c4f2e063c Mon Sep 17 00:00:00 2001 From: Genevieve Warren Date: Wed, 20 Nov 2019 18:02:50 -0800 Subject: [PATCH 4/6] diff review --- docs/core/run-time-config/garbage-collector.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/core/run-time-config/garbage-collector.md b/docs/core/run-time-config/garbage-collector.md index ca7b256549be0..2e7d4dcfb30bc 100644 --- a/docs/core/run-time-config/garbage-collector.md +++ b/docs/core/run-time-config/garbage-collector.md @@ -76,7 +76,7 @@ For more information about some of these settings, see the [Middle ground betwee - Specifies the exact processors that garbage collector threads should use. - If processor affinity is disabled by setting `System.GC.NoAffinitize` to `true`, this setting is ignored. - Applies to server garbage collection (GC) only. -- The value is a bit mask that defines the processors that are available to the process. For example, a decimal value of 1023 (or a hexadecimal value of 0x3FF if you're using the environment variable) is 0011 1111 1111 in binary notation. This specifies that the first 10 processors are to be used. To specify the next 10 processors, that is, processors 10-19, specify a decimal value of 1047552 (or a hexadecimal value of 0xFFC00), which is equivalent to a binary value of 1111 1111 1100 0000 0000. +- The value is a bit mask that defines the processors that are available to the process. For example, a decimal value of 1023 (or a hexadecimal value of 3FF if you're using the environment variable) is 0011 1111 1111 in binary notation. This specifies that the first 10 processors are to be used. To specify the next 10 processors, that is, processors 10-19, specify a decimal value of 1047552 (or a hexadecimal value of FFC00), which is equivalent to a binary value of 1111 1111 1100 0000 0000. | | Setting name | Values | Version introduced | | - | - | - | - | @@ -116,7 +116,7 @@ For more information about some of these settings, see the [Middle ground betwee | **app.config for .NET Framework** | [GCCpuGroup](../../framework/configure-apps/file-schema/runtime/gccpugroup-element.md) | `false` - disabled
`true` - enabled | | > [!NOTE] -> To configure the common language runtime (CLR) to also distribute threads from the thread pool across all CPU groups, enable the [](../../framework/configure-apps/file-schema/runtime/thread-useallcpugroups-element.md) option. For .NET Core apps, you can enable this option by setting the value of the `COMPlus_Thread_UseAllCpuGroups` environment variable to `1`. +> To configure the common language runtime (CLR) to also distribute threads from the thread pool across all CPU groups, enable the [Thread_UseAllCpuGroups element](../../framework/configure-apps/file-schema/runtime/thread-useallcpugroups-element.md) option. For .NET Core apps, you can enable this option by setting the value of the `COMPlus_Thread_UseAllCpuGroups` environment variable to `1`. ### System.GC.NoAffinitize/COMPlus_GCNoAffinitize From ddf6e8ade4bbe9aa2b0a5cc2f20f598b7e90d685 Mon Sep 17 00:00:00 2001 From: Genevieve Warren Date: Wed, 20 Nov 2019 18:10:13 -0800 Subject: [PATCH 5/6] remove n/as for app.config; other preview review --- docs/core/run-time-config/garbage-collector.md | 2 -- .../file-schema/runtime/gclohthreshold-element.md | 2 +- .../configure-apps/file-schema/runtime/runtime-element.md | 7 ++++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/core/run-time-config/garbage-collector.md b/docs/core/run-time-config/garbage-collector.md index 2e7d4dcfb30bc..1e6f18edae7bd 100644 --- a/docs/core/run-time-config/garbage-collector.md +++ b/docs/core/run-time-config/garbage-collector.md @@ -97,7 +97,6 @@ For more information about some of these settings, see the [Middle ground betwee | - | - | - | - | | **runtimeconfig.json** | `System.GC.GCHeapAffinitizeRanges` | Comma-separated list of processor numbers or ranges of processor numbers.
Unix example: "1-10,12,50-52,70"
Windows example: "0:1-10,0:12,1:50-52,1:70" | .NET Core 3.0 | | **Environment variable** | `COMPlus_GCHeapAffinitizeRanges` | Comma-separated list of processor numbers or ranges of processor numbers.
Unix example: "1-10,12,50-52,70"
Windows example: "0:1-10,0:12,1:50-52,1:70" | .NET Core 3.0 | -| **app.config for .NET Framework** | N/A | N/A | N/A | ### COMPlus_GCCpuGroup @@ -176,7 +175,6 @@ For more information about some of these settings, see the [Middle ground betwee | - | - | - | - | | **runtimeconfig.json** | N/A | N/A | N/A | | **Environment variable** | `COMPlus_GCLargePages` | 0 - disabled
1 - enabled | .NET Core 3.0 | -| **app.config for .NET Framework** | N/A | N/A | N/A | ## Large objects diff --git a/docs/framework/configure-apps/file-schema/runtime/gclohthreshold-element.md b/docs/framework/configure-apps/file-schema/runtime/gclohthreshold-element.md index 3228ed53ca3fa..37a9211fa80ff 100644 --- a/docs/framework/configure-apps/file-schema/runtime/gclohthreshold-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/gclohthreshold-element.md @@ -7,7 +7,7 @@ helpviewer_keywords: --- # GCLOHThreshold element -Specifies the threshold size, in bytes, that causes objects to go on the large object heap (LOH). +Specifies the threshold size, in bytes, that causes the garbage collector to put objects on the large object heap (LOH). [\](../configuration-element.md)\   [\](runtime-element.md)\ diff --git a/docs/framework/configure-apps/file-schema/runtime/runtime-element.md b/docs/framework/configure-apps/file-schema/runtime/runtime-element.md index 7bd302c65722f..6570995b46116 100644 --- a/docs/framework/configure-apps/file-schema/runtime/runtime-element.md +++ b/docs/framework/configure-apps/file-schema/runtime/runtime-element.md @@ -55,9 +55,10 @@ None. |[\](gcallowverylargeobjects-element.md)|On 64-bit platforms, enables arrays that are greater than 2 gigabytes (GB) in total size.| |[\](gcconcurrent-element.md)|Specifies whether the common language runtime runs garbage collection concurrently.| |[\](gccpugroup-element.md)|Specifies whether garbage collection supports multiple CPU groups.| -|[\](gcheapaffinitizemask-element.md)|Defines the affinity between GC heaps and individual processors.| -|[\](gcheapcount-element.md)|Specifies the number of heaps/threads to use for server garbage collection. | -|[\](gcnoaffinitize-element.md)|Specifies whether or not to affinitize server GC threads with CPUs.| +|[\](gcheapaffinitizemask-element.md)|Defines the affinity between garbage collection heaps and individual processors.| +|[\](gcheapcount-element.md)|Specifies the number of heaps/threads to use for server garbage collection.| +|[\](gclohthreshold-element.md)|Specifies the threshold size that causes the garbage collector to put objects on the large object heap.| +|[\](gcnoaffinitize-element.md)|Specifies whether or not to affinitize server garbage collection threads with CPUs.| |[\](gcserver-element.md)|Specifies whether the common language runtime runs server garbage collection.| |[\](generatepublisherevidence-element.md)|Specifies whether the runtime uses code access security (CAS) publisher policy.| |[\](legacycorruptedstateexceptionspolicy-element.md)|Specifies whether the runtime allows managed code to catch access violations and other corrupted state exceptions.| From ff7f9a5fffd820b416de1b62ceea305276e2bfae Mon Sep 17 00:00:00 2001 From: Genevieve Warren Date: Thu, 21 Nov 2019 09:15:31 -0800 Subject: [PATCH 6/6] feedback from maoni and petr --- docs/core/run-time-config/garbage-collector.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/core/run-time-config/garbage-collector.md b/docs/core/run-time-config/garbage-collector.md index 1e6f18edae7bd..c35597eb855d8 100644 --- a/docs/core/run-time-config/garbage-collector.md +++ b/docs/core/run-time-config/garbage-collector.md @@ -59,14 +59,14 @@ For more information about some of these settings, see the [Middle ground betwee - Limits the number of heaps created by the garbage collector. - Applies to server garbage collection (GC) only. - If GC processor affinity is enabled, which is the default, the heap count setting affinitizes `n` GC heaps/threads to the first `n` processors. (Use the affinitize mask or affinitize ranges settings to specify exactly which processors to affinitize.) -- If GC thread/processor affinity is disabled, this setting limits the number of GC heaps. +- If GC processor affinity is disabled, this setting limits the number of GC heaps. - For more information, see the [GCHeapCount remarks](../../framework/configure-apps/file-schema/runtime/gcheapcount-element.md#remarks). | | Setting name | Values | Version introduced | | - | - | - | - | | **runtimeconfig.json** | `System.GC.HeapCount` | *decimal value* | .NET Core 3.0 | | **Environment variable** | `COMPlus_GCHeapCount` | *hexadecimal value* | .NET Core 3.0 | -| **app.config for .NET Framework** | [GCHeapCount](../../framework/configure-apps/file-schema/runtime/gcheapcount-element.md) | *number* | 4.6.2 | +| **app.config for .NET Framework** | [GCHeapCount](../../framework/configure-apps/file-schema/runtime/gcheapcount-element.md) | *decimal value* | 4.6.2 | > [!TIP] > If you're setting the option in *runtimeconfig.json*, specify a decimal value. If you're setting the option as an environment variable, specify a hexadecimal value. For example, to limit the number of heaps to 16, the values would be 16 for the JSON file and 10 for the environment variable. @@ -195,15 +195,17 @@ For more information about some of these settings, see the [Middle ground betwee ### System.GC.LOHThreshold/COMPlus_GCLOHThreshold - Specifies the threshold size, in bytes, that causes objects to go on the large object heap (LOH). +- The default threshold is 85,000 bytes. +- The value you specify must be larger than the default threshold. | | Setting name | Values | Version introduced | | - | - | - | - | | **runtimeconfig.json** | `System.GC.LOHThreshold` | *decimal value* | .NET Core 1.0 | | **Environment variable** | `COMPlus_GCLOHThreshold` | *hexadecimal value* | .NET Core 1.0 | -| **app.config for .NET Framework** | [GCLOHThreshold](../../framework/configure-apps/file-schema/runtime/gclohthreshold-element.md) | *size in bytes* | .NET Framework 4.8 | +| **app.config for .NET Framework** | [GCLOHThreshold](../../framework/configure-apps/file-schema/runtime/gclohthreshold-element.md) | *decimal value* | .NET Framework 4.8 | > [!TIP] -> If you're setting the option in *runtimeconfig.json*, specify a decimal value. If you're setting the option as an environment variable, specify a hexadecimal value. For example, to set a threshold size of 500,000,000 bytes, the values would be 500000000 for the JSON file and 1F4 for the environment variable. +> If you're setting the option in *runtimeconfig.json*, specify a decimal value. If you're setting the option as an environment variable, specify a hexadecimal value. For example, to set a threshold size of 120,000 bytes, the values would be 120000 for the JSON file and 1D4C0 for the environment variable. ## Standalone GC