Note the default GC latency mode#15760
Merged
gewarren merged 7 commits intodotnet:masterfrom Nov 13, 2019
Merged
Conversation
gewarren
added a commit
to rpetrusha/docs
that referenced
this pull request
Nov 8, 2019
gewarren
pushed a commit
that referenced
this pull request
Nov 9, 2019
* Documented additional GC switches * Updated TOC * Update docs/core/runtime-config/envvars.md Co-Authored-By: Maira Wenzel <mairaw@microsoft.com> * Update docs/core/runtime-config/index.md Co-Authored-By: Maira Wenzel <mairaw@microsoft.com> * remove changes that are taken care of by prs #15760 and #15761 * add new elements to index file and parent element table; toc improvements
Contributor
Author
|
@tdykstra Could you take a look since Bill is out? |
tdykstra
reviewed
Nov 12, 2019
| # Latency modes | ||
|
|
||
| Latency refers to the time that the garbage collector intrudes in your application. During low latency periods, the garbage collector is more conservative and less intrusive in reclaiming objects. The <xref:System.Runtime.GCLatencyMode?displayProperty=nameWithType> enumeration provides two low latency settings: | ||
| To reclaim objects, the garbage collector (GC) must stop all the executing threads in an application. *Latency* refers to the time that the garbage collector intrudes in your application. In some situations, such as when an application retrieves data or displays content, a full garbage collection can occur at a critical time and impede performance. You can adjust the intrusiveness of the garbage collector by setting the <xref:System.Runtime.GCSettings.LatencyMode%2A?displayProperty=nameWithType> property to one of the <xref:System.Runtime.GCLatencyMode?displayProperty=nameWithType> values. |
Contributor
There was a problem hiding this comment.
The "Latency refers to ..." sentence seems vague to me. I think your definition of "Low latency" under the following H2 is clearer and makes this sentence unnecessary.
| |<xref:System.Runtime.GCLatencyMode.LowLatency>|For applications that have short-term, time-sensitive operations during which interruptions from the garbage collector could be disruptive. For example, applications that do animation rendering or data acquisition functions.| | ||
| |<xref:System.Runtime.GCLatencyMode.SustainedLowLatency>|For applications that have time-sensitive operations for a contained but potentially longer duration of time during which interruptions from the garbage collector could be disruptive. For example, applications that need quick response times as market data changes during trading hours.<br /><br /> This mode results in a larger managed heap size than other modes. Because it does not compact the managed heap, higher fragmentation is possible. Ensure that sufficient memory is available.| | ||
| |<xref:System.Runtime.GCLatencyMode.Batch>|For applications that have no user interface (UI) or server-side operations.<br /><br />This is the default mode for both server and workstation garbage collection when background garbage collection is disabled.| | ||
| |<xref:System.Runtime.GCLatencyMode.Interactive>|For most applications that have a UI.<br /><br />This is the default mode for workstation and server garbage collection for a standalone executable that's not hosted.<br /><br />This is the default mode for both server and workstation garbage collection when background garbage collection is enabled.| |
Contributor
There was a problem hiding this comment.
Having the two "This is the default" lines is confusing, especially as they're out of sync in listing server and workstation in different orders. Does the first line now override the second line, i.e., even if background collection isn't enabled it's the default in the line 1 scenario?
Also, I presume if an app is "hosted," the GC setting of the hosting process takes precedence; if so should we explicitly state that?
gewarren
commented
Nov 12, 2019
tdykstra
approved these changes
Nov 13, 2019
Contributor
Author
|
@tdykstra Thanks for the review. |
Youssef1313
pushed a commit
to Youssef1313/docs
that referenced
this pull request
Nov 20, 2019
* fixes dotnet#9739 * add in ron's changes from pr dotnet#12959 * feedback from tom
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #9739 .