Reduce memory usage of .NET services on a single machine

Tim Deschryver

Reduce memory usage of .NET services on a single machine link

Use case link

You see the memory consumption of multiple services growing and it doesn't decrease over time. After profiling the service you notice the memory of the service is released (there's no memory leak), but the unmanaged memory keeps on growing.

The Solution link

When multiple containerized .NET API's are published on one machine, it might be more performant to disable the server garbage collection. This might lead to more CPU usage (in our case this wasn't the case, or it was very minimal), but it will help to reduce the memory usage.

See the docs for more details.

Feel free to update this blog post on GitHub, thanks in advance!

Join My Newsletter (WIP)

Join my weekly newsletter to receive my latest blog posts and bits, directly in your inbox.

Support me

I appreciate it if you would support me if have you enjoyed this post and found it useful, thank you in advance.

Buy Me a Coffee at PayPal logo

Share this post on

Twitter LinkedIn