Replies: 2 comments
-
Hello @AlexG2017, as you can imagine there are a lot of differences within the runtime, libraries and GC between .NET Framework and 7. We would need some GC traces taken against both versions so we could investigate the issue further. Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a Web application (set of WCF services) on .NET Framework 4.8. This application was migrated to .NET 7 as set of Web API services (set of REST services). The application stays monolithic as it was. However, after migration a different behavior with memory consumption were detected. Profiling the migrated application shows that memory consumed didn't reclaim to OS after GC and become an unmanaged one.
For instance, the app can allocate 60 GB on start. After the initialization and full GC call the managed memory reduced to 40 GB, but the rest 20 GB become unmanaged and didn't reclaim to OS. Even if application is in idle state (there is no incoming requests to serve) and after forcing full GC calls, the consumed memory didn't change (the same 20 GB remains in unmanaged memory, and total memory consumption is 60 GB). As a rule, .NET runtime and GC become more aggressive in garbage collection if the system memory is about to be fully used. Such behavior can lead to more garbage collections, and more pauses. If .NET runtime/GC reclaim the memory back to OS, this GC pressure can be avoided.
Can you explain the .NET runtime and GC memory consumption behavior? Why didn't the memory reclaim to OS and stay unmanaged?
There are some posted issues about memory consumption and releasing: #49317, #80351.
Beta Was this translation helpful? Give feedback.
All reactions