aspose file tools*
The moose likes Performance and the fly likes I set Xmx to be 100M, but the java process Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "I set Xmx to be 100M, but the java process" Watch "I set Xmx to be 100M, but the java process" New topic
Author

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

avihai marchiano
Ranch Hand

Joined: Jan 10, 2007
Posts: 342
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

Joined: Jul 08, 2003
Posts: 24187
    
  34

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.


[Jess in Action][AskingGoodQuestions]
avihai marchiano
Ranch Hand

Joined: Jan 10, 2007
Posts: 342
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

Joined: Aug 24, 2005
Posts: 518
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

Joined: Oct 30, 2001
Posts: 1970
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.


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
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.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: I set Xmx to be 100M, but the java process