-1

I'm working in the product based company. In some modules our application is very slow. So we have to monitor in which java files or database connections oriented files are sucking the memory. Is there any tool to identify in which java files are totally sucking this memory ? Can you anybody to help me to identify the issue. Thanks in advance. I'm using IBM RSA 7.5.5 . Is there any plugin to integrate to this IDE ?

Kallar_Mannargudi
  • 485
  • 1
  • 4
  • 10

2 Answers2

1

Try using VisualVM, it's a free tool that can help you profile your application visually and can break it down to each class. It shows new class instances, different memory segment usages (heapspace, permgen space, etc.) as well as marking garbage collection operations. Java doesn't allow you to manually "free" objects the way C does, but rather, once an object leaves scope it is eventually garbage collected when the garbage collector runs.

If you find that you're ending up with a ton of instances hanging around when you don't expect them to be, then you may have a problem with how you're managing scope or you may be leaving around references to objects that you would otherwise expect to be transient. Garbage collection happens when there are no references to an object and/or that object is out of scope.

hsanders
  • 1,913
  • 12
  • 22
0

The Oracle trouble-shooting page includes a large section on analysing memory usage and looking for memory leaks:

And here is a good SO Question on this topic:

Community
  • 1
  • 1
Stephen C
  • 698,415
  • 94
  • 811
  • 1,216