High memory consumption (working set) under linux #122180
Unanswered
scrocquesel-ml150
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have multiple dotnet (v8 or v9) applications hosted on Azure App Services. We were historically deploying to a Windows App Plan (no container) and we are moving to linux container in a linux App Plan.
The issue is that application on linux are consuming a lot lot more memory than under windows.
With a Windows App Plan of 8GB, we can host more than 80 applications without issues. With a Linux app Plan of 8GB, we start having trouble after moving 20 applications.
We activate some runtime metrics and we observe that the working set memory is by far more important under linux than windows but the total heap allocated is roughly the same.
For example, this is what we were used to observe under windows

The most consuming app, consume less than 200MB and in average it is about 40MB.
For Linux, it is quite ten times in average

This is the same application deployed to windows and to linux


And here is an application that is excessively consuming working set RAM while the heap is very low.

For the container, we tried both the default base image provided by the dotnet sdk "PublishContainer" target, the mariner variant and also tried an alpine variant.
We tried to set the
DOTNET_GCHeapHardLimitbut it doesn't affect the working set size significantly.We tried looking into memory dump with dotnet analyse but we don't know much what to dig.
Is this an expected behavior ?
Beta Was this translation helpful? Give feedback.
All reactions