Reputation: 21
How do I get the performance counter "Large Object Heap Size" running .net core (3.1) on linux (Ubuntu 18.04)?
Upvotes: 1
Views: 3191
Reputation: 6509
What is LOH:
The .NET Garbage Collector (GC) divides objects up into small and large objects. When an object is large(>=85,000 bytes), it’s considered a large object, actions like copying it in memory elsewhere on the heap -- can be expensive.Because of this, the .NET Garbage Collector places large objects on the large object heap (LOH).
Few approaches that can be explored for .NET Core Apps
For Windows Specific:
Go to Performance Monitor > AddCounter > .NET CLR Memory > Large ObjectHeap Size > Select App Name
dotnet-counters:
dotnet-counters is a performance monitoring tool for .NET Core apps
Example Usage:
dotnet tool install --global dotnet-counters
dotnet-counters monitor --process-id 1902 System.Runtime
https://github.com/dotnet/diagnostics/blob/master/documentation/dotnet-counters-instructions.md
dotnet-dump:
The dotnet-dump CLI global tool is way to collect and analyze Windows and Linux dumps all without any native debugger involved like lldb on Linux
$ dotnet tool install -g dotnet-dump
$ dotnet-dump collect --process-id 1902
$ dotnet-dump analyze ./core_20190226_135850
https://github.com/dotnet/diagnostics/blob/master/documentation/dotnet-dump-instructions.md
dotnet-trace:
The dotnet-trace tool is a cross-platform CLI global tool that enables the collection of .NET Core traces of a running process without any native profiler involved
$ dotnet tool install --global dotnet-trace
dotnet-trace collect --process-id <PID> --providers Microsoft-Windows-DotNETRuntime
https://github.com/dotnet/diagnostics/blob/master/documentation/dotnet-trace-instructions.md
How do I get the performance counter "Large Object Heap Size" running .net core (3.1) on linux
Other Reference:
Upvotes: 3