From 35c659373bff838ce4766f83cf67ed54eb73f445 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Dec 2025 23:41:21 +0000 Subject: [PATCH 1/6] Initial plan From 85fec4814535557aa2e592b2db52787109e2f8e5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Dec 2025 23:44:49 +0000 Subject: [PATCH 2/6] Document default 75% value for GCHeapHardLimitPercent in container environments Co-authored-by: agocke <515774+agocke@users.noreply.github.com> --- docs/core/runtime-config/garbage-collector.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/core/runtime-config/garbage-collector.md b/docs/core/runtime-config/garbage-collector.md index 525c0f3f2ddc3..90c5288ae1d69 100644 --- a/docs/core/runtime-config/garbage-collector.md +++ b/docs/core/runtime-config/garbage-collector.md @@ -341,6 +341,7 @@ The following settings apply to all flavors of the GC: - Specifies the heap hard limit as a percentage of the total physical memory. If the process is running in a memory-constrained environment, that is, inside a container with a specified memory limit, the total physical memory is the memory limit; otherwise it's what's available on the machine. - This setting only applies to 64-bit computers. +- If this limit isn't configured but the process is running in a memory-constrained environment, that is, inside a container with a specified memory limit, the default value is 75 (75% of the container's memory limit). - This setting is ignored if the [Per-object-heap hard limits](#per-object-heap-hard-limits) are configured or the [heap hard limit](#heap-hard-limit) is configured. | | Setting name | Values | Version introduced | From f552eb5e4ddcb2a0b4409fe1c3f38d20ef893997 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Dec 2025 23:53:00 +0000 Subject: [PATCH 3/6] Reword GCHeapHardLimitPercent documentation per reviewer feedback Co-authored-by: agocke <515774+agocke@users.noreply.github.com> --- docs/core/runtime-config/garbage-collector.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/core/runtime-config/garbage-collector.md b/docs/core/runtime-config/garbage-collector.md index 90c5288ae1d69..f2ca46555904b 100644 --- a/docs/core/runtime-config/garbage-collector.md +++ b/docs/core/runtime-config/garbage-collector.md @@ -339,9 +339,8 @@ The following settings apply to all flavors of the GC: ### Heap hard limit percent -- Specifies the heap hard limit as a percentage of the total physical memory. If the process is running in a memory-constrained environment, that is, inside a container with a specified memory limit, the total physical memory is the memory limit; otherwise it's what's available on the machine. +- Specifies the heap hard limit as a percentage of the total physical memory. If the process is running in a memory-constrained environment, that is, inside a container with a specified memory limit, the container limit is considered the total physical memory. If in a memory-constrained environment, the default value is 75%. - This setting only applies to 64-bit computers. -- If this limit isn't configured but the process is running in a memory-constrained environment, that is, inside a container with a specified memory limit, the default value is 75 (75% of the container's memory limit). - This setting is ignored if the [Per-object-heap hard limits](#per-object-heap-hard-limits) are configured or the [heap hard limit](#heap-hard-limit) is configured. | | Setting name | Values | Version introduced | From d6dd0eb44ee3666961cefefef3c52a248223bf1d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 21:15:56 +0000 Subject: [PATCH 4/6] Reference GCHeapHardLimitPercent section for default value instead of duplicating Co-authored-by: agocke <515774+agocke@users.noreply.github.com> --- docs/core/runtime-config/garbage-collector.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/runtime-config/garbage-collector.md b/docs/core/runtime-config/garbage-collector.md index f2ca46555904b..646307b60a839 100644 --- a/docs/core/runtime-config/garbage-collector.md +++ b/docs/core/runtime-config/garbage-collector.md @@ -300,7 +300,7 @@ The following settings apply to all flavors of the GC: - The heap hard limit is defined as the maximum commit size, in bytes, for the GC heap and GC bookkeeping. - This setting only applies to 64-bit computers. -- If this limit isn't configured but the process is running in a memory-constrained environment, that is, inside a container with a specified memory limit, a default value is set. That default is the greater of 20 MB or 75% of the memory limit on the container. +- If this limit isn't configured but the process is running in a memory-constrained environment, that is, inside a container with a specified memory limit, a default value is set. That default is the greater of 20 MB or the [heap hard limit percent](#heap-hard-limit-percent) of the memory limit on the container. - This setting is ignored if the [Per-object-heap hard limits](#per-object-heap-hard-limits) are configured. | | Setting name | Values | Version introduced | From 928a0b79f7120df9cc62b08ac3c2c821e62af9dd Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Wed, 3 Dec 2025 15:11:36 -0800 Subject: [PATCH 5/6] Apply suggestion from @agocke --- docs/core/runtime-config/garbage-collector.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/core/runtime-config/garbage-collector.md b/docs/core/runtime-config/garbage-collector.md index 646307b60a839..35dc1ef376174 100644 --- a/docs/core/runtime-config/garbage-collector.md +++ b/docs/core/runtime-config/garbage-collector.md @@ -339,7 +339,8 @@ The following settings apply to all flavors of the GC: ### Heap hard limit percent -- Specifies the heap hard limit as a percentage of the total physical memory. If the process is running in a memory-constrained environment, that is, inside a container with a specified memory limit, the container limit is considered the total physical memory. If in a memory-constrained environment, the default value is 75%. +- Specifies the heap hard limit as a percentage of total physical memory. +- If the process runs inside an environment (e.g., a container) with a set memory limit, that limit is treated as the total physical memory. In such environments, the default value is 75%. - This setting only applies to 64-bit computers. - This setting is ignored if the [Per-object-heap hard limits](#per-object-heap-hard-limits) are configured or the [heap hard limit](#heap-hard-limit) is configured. From 1b240fef89e25df75e1b572c9299360cc115c6f2 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Wed, 3 Dec 2025 15:15:44 -0800 Subject: [PATCH 6/6] Apply suggestion from @agocke --- docs/core/runtime-config/garbage-collector.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/runtime-config/garbage-collector.md b/docs/core/runtime-config/garbage-collector.md index 35dc1ef376174..a50a9b53082c6 100644 --- a/docs/core/runtime-config/garbage-collector.md +++ b/docs/core/runtime-config/garbage-collector.md @@ -300,7 +300,7 @@ The following settings apply to all flavors of the GC: - The heap hard limit is defined as the maximum commit size, in bytes, for the GC heap and GC bookkeeping. - This setting only applies to 64-bit computers. -- If this limit isn't configured but the process is running in a memory-constrained environment, that is, inside a container with a specified memory limit, a default value is set. That default is the greater of 20 MB or the [heap hard limit percent](#heap-hard-limit-percent) of the memory limit on the container. +- If running in a memory-constrained environment (e.g., a container) and this value is unset, the default value is either 20 MB or the [heap hard limit percent](#heap-hard-limit-percent) of the container limit, whichever is larger. - This setting is ignored if the [Per-object-heap hard limits](#per-object-heap-hard-limits) are configured. | | Setting name | Values | Version introduced |