-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
ASP.NET Core 8 container images should use new Dynamic Adaptive GC mode #4683
Comments
cc @richlander How is this mode set? Is it a publish option? If so, how would that apply to the |
I assume this is an ENV. |
cc @Maoni0 |
Actually it's a runtime configuration knob, so can be set via project property, runtime config file, or environment variable AFAIK |
Seems like both are needed: |
you always need to enable Server GC (which asp.net already does anyway). |
This request is only relevant if we want to override the default via ENV. |
I took away from our conversations that we are not going to make this automatic, but encourage users to set a project property, which will then affect all of their usage. Is that correct? |
Have we landed on this decision? If so, can this be closed? |
I think we concluded that we wouldn't do this so I'll close this. |
@Maoni0 what did you mean here? I am struggling to figure out / find any reference of whether the GC Server mode is enabled by default using the default dotnet container images.
|
@tomachristian Default dotnet container images do not override GC settings. The GC mode is determined by the application deployed into the image or by additional environment variables that you can set when building the container with your application. ASP.NET applications have GC server enabled by default. Console applications have GC server disabled by default. You can override these defaults by setting ServerGarbageCollection msbuild property when building the application; or by setting |
Thank you, @jkotas! |
@jkotas we were trying to enable the Server GC and we noticed that Later edit: dotnet/runtime#64393 yeah, they are different :( |
.NET 8 introduces a new variation of Server GC called "Dynamic Adaptive GC" that can be opted-into. Its intent is to facilitate Server GC-level performance but with memory use more inline with what the application actually needs based on the current load, i.e. it will start out small (e.g. small number of heaps, low allocation budget) and then grow and shrink based on the application's allocation patterns.
While we don't feel this new mode is ready to be the default for all apps using Server GC at this stage, it will be the default in ASP.NET Core projects set to use native AOT (
<PublishAot>true</PublishAot>
) in .NET 8. It was suggested that in addition to that, a good click-stop for .NET 8 would be to use this new mode as the default mode in our .NET 8 ASP.NET Core container images.The text was updated successfully, but these errors were encountered: