• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic