Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java RMI tcp connect memory issue

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.

like image 784
moshe beeri Avatar asked Apr 20 '16 11:04

moshe beeri


1 Answers

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.

like image 154
Tom Avatar answered Oct 22 '22 17:10

Tom