Hi ,
Thanks for reaching out to Microsoft Q&A.
Yes, what you are seeing is expected behaviour with .NET 8 in containerised azure functions, especially on AKS.
.NET 8 has a more aggressive GC and memory reservation strategy compared to earlier runtimes. The runtime proactively reserves heap memory up to a percentage of the container limit to reduce allocation pressure and GC pauses. As a result, memory usage ramps up after startup and then stabilises, even when CPU is low and there is no leak. This is by design and commonly shows as 70–90 percent of the limit in steady state.
There is no MS guidance today that gives a precise “baseline memory” number for .NET 8 Functions containers. The practical recommendation is to size memory based on steady-state usage, not idle usage, and treat the reserved memory as committed capacity. For 2 Gi limits, what you see is normal.
Tuning options are limited. You can experiment with DOTNET_GCHeapHardLimit or DOTNET_GCHeapHardLimitPercent, but Microsoft does not officially recommend overriding GC limits for Azure Functions unless you deeply understand the workload, as it can hurt throughput and latency. There is no supported setting to bring memory back to .NET 6 levels.
Bottom line: this is not a leak, not a regression bug, and not an AKS issue. Plan capacity assuming higher baseline memory for .NET 8 Functions, validate under peak load, and proceed to PROD with adjusted limits rather than chasing the usage down.
Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.