-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Document default 75% value for GCHeapHardLimitPercent in container environments #50280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
6
commits into
main
Choose a base branch
from
copilot/update-memory-limit-defaults
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3
−2
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
35c6593
Initial plan
Copilot 85fec48
Document default 75% value for GCHeapHardLimitPercent in container en…
Copilot f552eb5
Reword GCHeapHardLimitPercent documentation per reviewer feedback
Copilot d6dd0eb
Reference GCHeapHardLimitPercent section for default value instead of…
Copilot 928a0b7
Apply suggestion from @agocke
agocke 1b240fe
Apply suggestion from @agocke
agocke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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. | ||||||
agocke marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| - This setting is ignored if the [Per-object-heap hard limits](#per-object-heap-hard-limits) are configured. | ||||||
|
|
||||||
| | | Setting name | Values | Version introduced | | ||||||
|
|
@@ -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 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 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%. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - 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. | ||||||
|
|
||||||
|
|
||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phrase "the heap hard limit percent of the memory limit on the container" is ambiguous. "Heap hard limit percent" is a setting name, not a value, so this phrasing suggests using a setting name in a calculation. Consider: "That default is the greater of 20 MB or the default percentage from Heap hard limit percent (75%) applied to the memory limit on the container." This clarifies that it's using the default percentage value from that setting.