Java RMI tcp connect memory issue
Asked Answered
K

1

14

I have an issue I can locate in the profiler but I have no clue how to fix it. After I load the application I get this sawtooth wave pattern, the program is idle but consume memory, as you may see here.

memory allocation in time

When I checked the sampler thread memory allocations I saw that RMI TCP Connection to my eth0 (172.16.20.51) consumes memory at half a megabyte per second (413,213) which results in production to log 'stop the world' GC :-( sampler thread memory I could not track the reason of this issue as I don't know which port it is of which thread it is, on the other hand I tried to run my jar with -com.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false flags but it was not helpful. Any idea will be appreciated.

Kesley answered 20/4, 2016 at 11:55 Comment(6)
in your snapshot it is pool-6-thread-1 that consumes everythingMeadors
what about your heap histogram? Can we have a snapshot of it?Meadors
a heap dump will also help in this caseMeadors
Is this an RMI server? Or client? Is it really idle or does it have an outbound or inbound RMI connection?Flabellum
Its client RMI, I don't know its originator, it's part of huge code base. how do I do heap dump and how I can read it?Kesley
the issue is not pool-6 since its stays the same, the issue is with this rmi tcp consuming 413K bytes per secondKesley
W
17

I know this is an old post, but since I stumbled across it with the same problem, an answer might help others too..

The RMI TCP Connection thread is how Virtual VM samples your memory usage. So a high Allocated Bytes/sec is what you expect to see when profiling, and doesn't (necessarily) indicate any problem with your application. See for example this SO question.

Regarding heap dumps, Visual VM has a 'Heap Dump' button in the Monitor and Sampler tabs, which will save a heap dump file. You can load this into, for example, the free Eclipse Memory Analyzer (MAT) to examine for memory leaks etc.

Weldon answered 9/1, 2017 at 18:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.