Aladdin
Aladdin

Reputation: 1337

Analyze remote large heap dump

I'm having Java heap dump with about 70 GB in remote Debian machine, I can't analyse it in my local machine using MAT, although I can get an overview and suspicious leak reports as HTML pages, but they are brief and there are href for the objects there that don't point to anything (maybe MAT doesn't mean to create actual links there but just for styling purposes).

However, is there anyway to fully analyze a heap dump of that size?

Upvotes: 3

Views: 805

Answers (2)

Vishy Anand
Vishy Anand

Reputation: 133

you can use headless MAT analyzer script to check top component ( using org.eclipse.mat.api:top_components ), that may help.

If Leak suspect doesn't tell enough then top components can give insight that which bean is occupying more space. So you can check the methods associated with that.

https://stackoverflow.com/a/76298700/5140851

Upvotes: 0

Mark Bramnik
Mark Bramnik

Reputation: 42461

If you can't run MAT on that server, then you might want to run a jhat utility.

It will run the web server on a port (that you can override) and will provide a web console and query language called OQL (object query language) that you can use to analyze the heap dump. It looks somewhat like SQL.

Here is an example:

jhat -J-Xmx32g -port 7000 <PATH_TO_HEAPDUMP>

And then access in browser:

http://<IP>:7000

There are many tutorials about OQL, here is one of them

Upvotes: 2

Related Questions