dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.64k stars 25.28k forks source link

Seemingly inconsistent server/workstation garbage collection documentation #26110

Open travis-icorein opened 2 years ago

travis-icorein commented 2 years ago

From this article...

ASP.NET Core apps use server GC by default.

Seems to be contradicted by this...

Default: Workstation garbage collection. This is equivalent to setting the value to false.

Which this answer supports...

If server garbage collection is not enabled, workstation garbage collection is in effect (with or without concurrent collection).

However...

dotnet new web -o web
cd web
dotnet build
Get-Content .\bin\Debug\net6.0\*runtime*.json | Select-String -Pattern GC

...shows...

"System.GC.Server": true,

FWIW, in my dotnet core 3.1 project, editing the csproj to set ServerGarbageCollection to false, does result in both "System.GC.Server": false, in the generated runtime json file and gives the expected result in System.Runtime.GCSettings.IsServerGC during runtime.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

wadepickett commented 2 years ago

@JamesNK, I also find those statements a bit confusing so I'm not in a position to help improve this. Could you clarify?