Skip to content
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

[release/6.0] Environment variable should override property for gcServer. #61969

Merged
merged 1 commit into from
Dec 15, 2021

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 23, 2021

Backport of #61950 to release/6.0

/cc @AaronRobinsonMSFT

Customer Impact

This is a regression from .NET 5 to .NET 6 (when we consolidated complus_ into dotnet_ environment variable naming). The change in behavior has been observed by multiple customers.

The ASP.NET Core project default settings define the GC to operate in Server mode. However, Some customers prefer Workstation. The recommended approach to address this is setting DOTNET_gcServer=0, which will override the default configuration property. Without this change the only workaround is to edit the project runtimeconfig.json file via a template or set an MSBuild property.

Testing

A test was added for the impacted scenario.

Risk

Low. The change is permitting a niche scenario for the overriding of configuration properties. The only known consumer of this change is the tested GC scenario.

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Nov 23, 2021

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #61950 to release/6.0

/cc @AaronRobinsonMSFT

Customer Impact

The ASP.NET Core project default settings define the GC to operate in Server mode. However, Some customers prefer Workstation. The recommended approach to address this is setting DOTNET_gcServer=0, which will override the default configuration property. Without this change the only workaround is to edit the project runtimeconfig.json file via a template or set an MSBuild property.

Testing

A test was added for the impacted scenario.

Risk

Low. The change is permitting a niche scenario for the overriding of configuration properties. The only known consumer of this change is the tested GC scenario.

Author: github-actions[bot]
Assignees: -
Labels:

area-GC-coreclr

Milestone: -

@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 6.0.x milestone Nov 23, 2021
@AaronRobinsonMSFT
Copy link
Member

/cc @mangod9 @cshung

@AaronRobinsonMSFT AaronRobinsonMSFT added the Servicing-consider Issue for next servicing release review label Nov 23, 2021
Copy link
Member

@mangod9 mangod9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is a regression should consider for 6.0.x

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. We should take for consideration for 6.0.x

@mangod9
Copy link
Member

mangod9 commented Dec 2, 2021

Some clarifications on this:

  1. This is a regression from .net 5.0, where-in if you try to override the gcServer setting via environment variable (to disable it, since that is the default) it doesnt take effect
  2. Couple of external customers have hit this: Garbage collection method is not manageable by environment variables in .net 6 #61674 and Different Heap behavior between 5.0 and 6.0. Maybe memory leak? #62182
  3. Please note that upgrading to .net 6 seems to show a memory utilization regression since the app switches from wks to svr.

@Pilchie Pilchie added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Dec 2, 2021
@Pilchie Pilchie modified the milestones: 6.0.x, 6.0.2 Dec 2, 2021
@safern safern merged commit 8f06e33 into release/6.0 Dec 15, 2021
@safern safern deleted the backport/pr-61950-to-release/6.0 branch December 15, 2021 18:35
@ghost ghost locked as resolved and limited conversation to collaborators Jan 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-GC-coreclr Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants