Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Heap Size Vs Process Size

 
Srinivas Mallela
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure if this is the right forum to post please excuse me if not.

I am really confused about the Heap Size vs the Java process size. Can somebody explain me.

- I have the heap size set to 768 MB (Start and Max are same)
- The perm size set to 256 MB (Min) & 512MB as the Max

When I start the OAS/Webapp server the Java process associated with the OAS/Webapp sever show at a memory consumption of 1.1G

I am not sure the Java process memory size is a combination of PermSize+Heap Size?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to move this to Java In General (Advanced) as it is not specific to Tomcat.

Good luck with your question.
-Ben
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A java virtual machine is a C or C++ program. It runs on the OS like any other program. It takes memory to do the things it does. Like any other program.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following is from experience, but may not be true for all JVMs ...

The process size - what the OS reports for java.exe - can start out much lower than the sum of all Java memory maximums. The JVM asks the OS for some fraction of the space it will eventually need. As you create lots of objects, the JVM may ask the OS for more, and you'll see process memory go up. After garbage collection you might expect to see the process memory go back down, but the JVM doesn't give memory back. It just hangs on to it for the next time you need it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic