Skip to content

[TraceEvent] Microsoft.Diagnostics.Tracing.Etlx.TraceCallStacks+CallStackInfo[] - High memory usage #1199

Closed as not planned

Description

@suprak

We've noticed that ever since update to the latest version of TraceEvent (from a much older one), we have been seeing much higher memory of TraceEvent. Mostly related to symbol resolution.

For instance from a dump (I can share internally),

0:000> !do 000001637fc31020
Name:        Microsoft.Diagnostics.Tracing.Etlx.TraceCallStacks+CallStackInfo[]
MethodTable: 00007ffe66678120
EEClass:     00007ffe666780a0
Size:        177629656(0xa9669d8) bytes
Array:       Rank 1, Number of elements 22203704, Type VALUETYPE (Print Array) 

0:000> !do 00000163b25e1020
Name:        Microsoft.Diagnostics.Tracing.Etlx.TraceCallStacks+CallStackInfo[]
MethodTable: 00007ffe66678120
EEClass:     00007ffe666780a0
Size:        134254640(0x8009030) bytes
Array:       Rank 1, Number of elements 16781827, Type VALUETYPE (Print Array)

That's 22million and 16milion entries per array.

Any plans or ideas on how TraceEvent memory usage can be improved?
We rely on TraceEvent as part of a production profiling workflow (can provide my context internally if you would like).

Activity

  1. changed the title [-]Microsoft.Diagnostics.Tracing.Etlx.TraceCallStacks+CallStackInfo[] - High memory usage[/-] [+][TraceEvent] Microsoft.Diagnostics.Tracing.Etlx.TraceCallStacks+CallStackInfo[] - High memory usage[/+] on Jun 8, 2020
  2. brianrob commented on Jun 12, 2020

    @brianrob
    Member

    Zeus (@suprak), do can you tell me which versions you're referring to here? I suspect this might be caused by #1136.

  3. suprak commented on Jun 12, 2020

    @suprak
    Author

    Sorry, should have mentioned that in my original post,

    <PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="2.0.49" />

  4. brianrob commented on Jun 12, 2020

    @brianrob
    Member

    No worries. Is 2.0.49 the new version that you're running or is that the old version?

  5. suprak commented on Jun 12, 2020

    @suprak
    Author

    We upgraded from 2.0.2 back in February.
    So 2.0.49 is what we are using currently.

  6. brianrob commented on Jun 13, 2022

    @brianrob
    Member

    Zeus (@suprak), is this still an issue or should we close this?

  7. suprak commented on Jun 14, 2022

    @suprak
    Author

    I haven't seen any alerts with this recently, so go ahead and close.

  8. therickfactr commented on Aug 9, 2026

    @therickfactr

    For anyone finding this thread later: we're seeing the same unbounded TraceCallStacks+CallStackInfo[] growth, but on the real-time/EventPipe path in a long-lived server process rather than during offline analysis, with production evidence (~0.6 GB/day to OOM, convicted by an A/B gcdump).

    Since this one was closed in 2022 on reporter attrition rather than a resolution, I've opened it as a new issue rather than reviving a dormant thread: #2451. Happy to have it folded back in here if maintainers prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions