Skip to content

Performance degradation in 1.16.1 - GarbageCleaner.markUnreachableAsGCRoots #140

Description

@sadaaithal

I have a 7g heap from one of our customers.
I suspect there's a lot of unreachable objects in it, because normal MAT parsing shows the heap occupancy at ~120mb.
My colleage was able to process this heap on his Mac with the "keep unreachable objects" check box selected.

For some reason, for me it is stuck for a long time on both Windows and Linux.
The stack is consistent

"Worker-0: Parsing heap dump from 'C:\Users\saithal\Downloads\heap_afterSuccessStreamingRuns_allObj\heap_afterSuccessStreamingRuns_allObj.hprof'" #36 prio=5 os_prio=0 cpu=2207171.88ms elapsed=3016.26s tid=0x000001a572ef5570 nid=0x15c3c runnable  [0x00000006726fd000]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.mat.parser.internal.snapshot.ObjectMarker.countMarked(ObjectMarker.java:177)
        at org.eclipse.mat.parser.internal.snapshot.ObjectMarker.markSingleThreaded(ObjectMarker.java:148)
        at org.eclipse.mat.parser.internal.GarbageCleaner.markUnreachableAsGCRoots(GarbageCleaner.java:935)
        at org.eclipse.mat.parser.internal.GarbageCleaner.clean(GarbageCleaner.java:160)
        at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.parse(SnapshotFactoryImpl.java:466)
        at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.openSnapshot(SnapshotFactoryImpl.java:224)
        at org.eclipse.mat.snapshot.SnapshotFactory.openSnapshot(SnapshotFactory.java:149)
        at org.eclipse.mat.ui.snapshot.ParseHeapDumpJob.run(ParseHeapDumpJob.java:99)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

OR linux

Worker-1: Parsing heap dump from '/home/saithal/cases/dbmi-oom/heap_afterSuccessStreamingRuns_allObj.hprof'" #178 prio=5 os_prio=0 cpu=284351.72ms elapsed=403.30s tid=0x00007f11b2f65790 nid=0x2701a4 runnable  [0x00007ef1d2ec7000]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.mat.parser.internal.snapshot.ObjectMarker.countMarked(ObjectMarker.java:177)
        at org.eclipse.mat.parser.internal.snapshot.ObjectMarker.markSingleThreaded(ObjectMarker.java:139)
        at org.eclipse.mat.parser.internal.GarbageCleaner.markUnreachableAsGCRoots(GarbageCleaner.java:935)
        at org.eclipse.mat.parser.internal.GarbageCleaner.clean(GarbageCleaner.java:160)
        at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.parse(SnapshotFactoryImpl.java:466)
        at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.openSnapshot(SnapshotFactoryImpl.java:224)
        at org.eclipse.mat.snapshot.SnapshotFactory.openSnapshot(SnapshotFactory.java:149)
        at org.eclipse.mat.ui.snapshot.ParseHeapDumpJob.run(ParseHeapDumpJob.java:99)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

My linux box is server class - 128cpus and >500gb RAM

[saithal@RHEL84 dbmi-oom]$ free -g
              total        used        free      shared  buff/cache   available
Mem:            754         175         373           0         205         573
Swap:            29           0          29

[saithal@RHEL84  dbmi-oom]$ lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              128
On-line CPU(s) list: 0-127
Thread(s) per core:  2
...

I can provide a sanitized version of this heap for a review but im afraid that might wipe out key info that causes this issue in the first place.
I am trying to understand why the ObjectMarker switches to single threaded. (going by what I see on the thread stack)

I suppose I can check the useOldMarker from 32539da.
Any other ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions