• Post Reply Bookmark Topic Watch Topic
  • New Topic

jvm heap size .vs. process size

 
Vin Kris
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My java process starts of with 175MB. The JVM memory size is set to -Xms64m -Xmx128m. (I assume this controls only the heap size). The resident memory occupied by the process is growing substantially daily. After 4 days, the application is now using over 500MB. If there is a memory leak in the application, shouldn't I get an OutOfMemory error? Why is the process size increasing? Can somebody explain the basics of memory management by JVM and how the user can control it? I'm using W.A.S 3.5.4 (SPARC JDK 1.2.2_07). Thanks.
(ps: getting a SIGSEGV sporadically. Maybe your answer can shoot both these birds)
[ July 19, 2002: Message edited by: Vin Kris ]
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm... my guess is that it's some sort of memory leak in a native code library, which isn't part of the JVM heap, and won't necessarily throw an OutOfMemoryError since it's not managed by the JVM directly. I would suggest first, upgrade to the latest JDK if you haven't already; assorted past leaks have generally been fixed. Then, try to figure out which classes/methods are involved with the growing memory. Search Sun's bug database for open bugs with the words "memory leak" plus the names of classes and methods you're using, to see if the problem has been reported already, and if there's any useful feedback. Try testing your application carefully, watching memory as you perform various operations, to see if you can figure out which specific activities are responsible. It may also be useful to temporarily disable sections of code, to rule them out as possible culprits.
Lastly, it may be a good idea to invest in a good performance analysis tool like JProbe. However I don't really know if this will be any use if the problem is indeed in native code not managed by the JVM. Perhaps others who have used such tools more extensively can offer opinions here.
Good luck...
 
Vin Kris
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jim. I'm on the process of setting up OptimizeIt tool for memory debugging.
Perhaps you could help me out with the SIGSEGV. The problem I'm having is that there is no coredump and so I'm still in the dark. Can you tell me how a user can control the core-file generation in JDK 1.2.2? I understand that the JVM does signal handling and JDK 1.1.8 has some features for the user to specify which signals the JVM should hanlde. There is some feature provided in 1.4 too but i'm interested in knowing the mechanism in JDK 1.2.2.
I definitely should be getting a lead if i can capture a core file. Any help? Thanks anyway.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm... don't know anything about that, myself. But I'd be interested in hearing what you learn about it. Or what others can tell us...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!