Question about memory consumption #2201
-
Hello, please take a look at below memory consumption plot and I will have a question regarding it: Point 1 represents moment in time when our service with Yarp was made public and started to route traffic. Before that it had routes and clusters loaded into memory. There were some minor background processes running in it (like checking if configuration should be reloaded due to new routes). Immediately we can see huge spike in memory usage and it's totally understandable since it started to receive huge amount of calls. Since we were dangerously close to limit we decided to disable all traffic to that service in order to scale it up first. Point 2 represents that moment of shutting down traffic. After few hours we can observe that memory usage was stabilized at some level (point 3) but definitely higher that the original one despite returning to original state (no traffic going through this service). During whole time no changes were made to service itself, enabling and cutting traffic were made on different level of our application. Now question, is it normal to have such memory consumption despite not receiving any traffic? Maybe Yarp is caching something so it was cached during receiving traffic and now it's staying in that cache and GC is not able to dispose it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Are you able to collect a GC dump for points 1,2,3 using dotnet-gcdump or dotnet-monitor? If you can collect multiple dumps, then load them into Visual Studio, you can compare them to see what exactly is holding on to the memory, and what is rooting those objects. |
Beta Was this translation helpful? Give feedback.
Are you able to collect a GC dump for points 1,2,3 using dotnet-gcdump or dotnet-monitor? If you can collect multiple dumps, then load them into Visual Studio, you can compare them to see what exactly is holding on to the memory, and what is rooting those objects.