Frequent GC Triggered by 'Internal Tuning' on Windows node compared to Linux/ARM node in .NET 8.0.16
@kkokosa is already working on this.
Since Aug 7, 2026.
Assessment
This issue has not been assessed yet.
Description
Description
We (RavenDB team) are investigating an issue related to GC where a RavenDB cluster node running Windows Server 2022 (WIN) experiences significantly more frequent GCs and higher GC pause times compared to its counterpart running on Ubuntu 24.04.2 (ARM), despite both nodes having the same workload and configuration.
This is a replica cluster that receives replicated data from the main cluster, with no external requests. Both nodes have identical databases, configurations, and GC settings specified in the Raven.Server.runtimeconfig.json file:
{
"runtimeOptions": {
"tfm": "net8.0",
"includedFrameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "8.0.16"
},
{
"name": "Microsoft.AspNetCore.App",
"version": "8.0.16"
}
],
"configProperties": {
"System.GC.Concurrent": true,
"System.GC.Server": true,
"System.GC.RetainVM": true,
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false,
"System.Runtime.TieredPGO": true
}
}
}
Both nodes have identical hardware configurations (2 cores, 8 GB memory). The difference lies in their operating systems and processor architecture:
WIN: Windows Server 2022 on x64.ARM: Ubuntu 24.04.2 on ARM64.
The issue becomes noticeable after a restart of the cluster nodes (regular updates of RavenDB) but that isn't always the case, it doesn't reproduce always. Initially, GC behavior is similar for both nodes, but within a few minutes, the WIN node begins triggering GCs much more frequently. On analyzing the GC traces, we consistently observe the WIN node triggering GCs due to "Internal Tuning", whereas the ARM node does not exhibit this behavior.
Configuration
-
2 cores. 8 GB memory
-
WIN: Windows Server 2022 (x64) -
ARM: Ubuntu 24.04.2 (ARM64) -
.NET 8.0.16
Analysis
Initially, both nodes show similar GC activity. After a few minutes, however, the GC on WIN becomes significantly more frequent, leading to smaller heap sizes for Gen0 and Gen1, and subsequently, a much higher PauseTimePercentage:
-
GC traces collected using
dotnet-trace collect --profile gc-verbose --name Raven.Server --duration 00:05:00revealed:-
WINnode: 163 GCs in 5 minutes
-
ARMnode: 47 GCs in 5 minutes
-
The primary reason for GC on the
WINnode is "Internal Tuning", while this is absent on theARMnode.
-
17 hours later, the issue persists with the WIN node still showing higher GC activity:
-
Pause Time Percentage (PauseTimePercentage):
WINnode: 4.69%ARMnode: Stable and much lower
-
GC traces for
WINnode - there are "Internal Tuning" reasons but there are also GC where the reason isn't specified:
Regression?
This does not appear to be a regression, as we have observed similar behavior in the past.
We are seeking assistance in understanding:
- What does "Internal Tuning" mean in this context, and why might it disproportionately affect the
WINnode? - Are there GC or runtime optimizations that are platform/architecture-specific that could explain this behavior?
- Are there any additional steps we should take to investigate or mitigate this problem?
Detailed insights on "Internal Tuning" triggers and how they differ between platforms would be greatly appreciated.
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/runtime
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area-System.Reflection blocking-clean-ci-optional Known Build Error os-mac-os-x untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
agentic-workflows untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area-VM-meta-mono untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectory Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSResourceGet#2056 ·