Top 10 Ways to Reduce .NET Memory Usage in Kubernetes
If your .NET pods are each using 1β2 GB of RAM, you may be leaving a lot of pod density β and money β on the table. Here are the first things I would look at.
1. Set Realistic Kubernetes Memory Limits
Do not let every pod believe it has access to the whole node.
|
|
This gives the .NET runtime better boundaries and helps Kubernetes schedule pods more predictably. The .NET GC specifically looks at the container’s memory limit (not the request) to decide how much heap it’s allowed to use, so an unset or overly generous limit is what lets the managed heap grow far larger than you intended.