Skip to content

Commit 1536707

Browse files
authored
Document default 75% value for GCHeapHardLimitPercent in container environments (#50280)
1 parent 01a262d commit 1536707

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/core/runtime-config/garbage-collector.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ The following settings apply to all flavors of the GC:
300300

301301
- The heap hard limit is defined as the maximum commit size, in bytes, for the GC heap and GC bookkeeping.
302302
- This setting only applies to 64-bit computers.
303-
- 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.
303+
- 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.
304304
- This setting is ignored if the [Per-object-heap hard limits](#per-object-heap-hard-limits) are configured.
305305

306306
| | Setting name | Values | Version introduced |
@@ -339,7 +339,8 @@ The following settings apply to all flavors of the GC:
339339
340340
### Heap hard limit percent
341341

342-
- 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.
342+
- Specifies the heap hard limit as a percentage of total physical memory.
343+
- If the process runs inside an environment with a set memory limit (for example, a container), that limit is treated as the total physical memory. In such environments, the default value is 75%.
343344
- This setting only applies to 64-bit computers.
344345
- 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.
345346

0 commit comments

Comments
 (0)