• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I set Xmx to be 100M, but the java process

 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
consume more than 100M and it still growing.

I look at the task manager and i see that the java process consume more than 100M, does any one has explain for this?


Thank you
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

We have a strict policy on display names, which must be a real first and last name with a space between -- not the same name twice.

Please go here and fix your display name up, pronto. Thanks, pardner!

As to your question: the 100m is the size of the Java heap, the arena set aside for allocating Java objects. The VM implementation itself also takes up memory, and this memory is outside of the 100m.
 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The memory that display in the task manger is more than 140M and it getting bigger.

Is this reasonable?

I am sure that i set the Xmx correctly.
and i am sure that this is the process
 
Scott Johnson
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The -Xmx parameter sets the maximum Java heap size. Heap is only part of the total memory used by the JVM. So yes, the JVM process as a whole can consume more than that amount.

See chapter 3 of the JVM spec for more information.
[ January 14, 2007: Message edited by: Scott Johnson ]
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, if you are using Windows Task Manager, be aware that the default column "Memory Usage" is often misleading. It shows the amount of physical memory used by the process. This can vary as the OS decides to page-in or page-out parts of your application. It is much more instructive to look at the "VM Size" column; this column is not shown by default but can be turned on in the View menu.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using Java 5 or later, you can use jconsole to see where the VM uses how much memory.

In addition to the heap, there is also the permanent generation (basically the classes' byte code), the stacks (for local variables etc.), the VM itself etc. pp.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic