You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are collecting and reading a continuous session of trace data (in this case logs and metrics) from EventSource using TraceEvent. While this works correctly, and strictly speaking there is no memory leak, we are seeing a very large amount of PinnedBuffer objects, with pinned memory regions. This in turn causes the GC operations to not be able to compact memory properly and as a result the heap size increases. Most of the heap is free space.
Ideally, we would want PinnedBuffers to be determinstically cleaned up (unpinned) or use a pool of pinned buffers that gets rented and diposed as necessary, instead of constantly allocating a new pinned buffer.
Some RAW GC data
!dumpheap -type PinnedBuffer
Statistics:
MT Count TotalSize Class Name
7137a85bfbb8 2,071 66,272 Microsoft.Diagnostics.Tracing.EventPipe.PinnedBuffer
Total 2,071 objects, 66,272 bytes
!gchandles -type pinned
Statistics:
MT Count TotalSize Class Name
00007137a37e5ac8 1 24 System.Object
00007137a3a893f0 978 4528747 System.Byte[]
Total 979 objects
The text was updated successfully, but these errors were encountered:
We are collecting and reading a continuous session of trace data (in this case logs and metrics) from EventSource using TraceEvent. While this works correctly, and strictly speaking there is no memory leak, we are seeing a very large amount of PinnedBuffer objects, with pinned memory regions. This in turn causes the GC operations to not be able to compact memory properly and as a result the heap size increases. Most of the heap is free space.
Ideally, we would want
PinnedBuffer
s to be determinstically cleaned up (unpinned) or use a pool of pinned buffers that gets rented and diposed as necessary, instead of constantly allocating a new pinned buffer.Some RAW GC data
The text was updated successfully, but these errors were encountered: