Open deyanp opened 3 years ago
Hi @deyanp , Certain variations is expected when upgrading to different version of the framework in lot of different areas like memory utilization. The custom host which is self migrated is not yet supported and our engineers and still figuring out all the possibilities with the latest versions. We need to know what in your scenario could have impacted the memory utilization. Are you using the default docker container. Kindly give us more details so as to understand the scenario better
@v-anvari , I saw the 50% memory reduction for all 40 pods I have, without exception. Our system is nothing special - just writing/reading entities to/from MongoDB.
In both cases I am using the default MS docker images.
@v-anvari Note that I need to correct above memory footprints:
With Azure Functions 3.1 host: after certain time abot 330 - 380 MB/pod
With custom host, .net 5: 160-170 MB/pod, again after certain ramp up time.
cc @anthonychu / @fabiocav
I have converted a .net core 3.1 Azure Functions app to a self-hosted .Net 5.0 asp.net core app (using Kestrel and Webjobs SDK) and I am observing 3 times difference in memory footprint (Azure Functions Host: 180+ MiB, Custom Host: 60 Mib) in docker, running locally on my machine.
Why is the Azure Functions Host consuming 3x the memory? I have been always wondering why my relatively simple microservice pods are consuming 200-300 Mb of memory ...
Docker Image for .net Core 3.1 Azure Functions app:
Docker Images for .net 5.0 Custom Host app:
Note: Language is F#, and the custom host is encapsulated in an additional Program.fs file I added to my existing Azure Function App project, containing Host.CreateDefaultBuilder, builder.ConfigureServices, builder.ConfigureLogging, builder.ConfigureWebJobs, builder.ConfigureWebHostDefaults and similar ... I added also
<OutputType>Exe</OutputType>
to the project file, removed
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.9" />
and changed
<TargetFramework>net5.0</TargetFramework>
...