If System.runFinalization() and System.gc() are misleading... what should I
use instead, to force to garbage collection?

So, the amount of memory the JVM uses, will always increase?  How do I get
it to decrease?

256 was an arbitrary choice.  Is there some formula I should be using (based
on projected traffic)?

bort

"Shapira, Yoav" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

Hi,

>We've setup Tomcat to use a max of 256Mb.  I've been tracking memory
usage
>using:
>
>   System.runFinalization();
>   System.gc();

Be aware that the above two lines are misleading, as they are
suggestions and not guaranteed to actually do anything.

>What I've noticed is that the the 'T' value (Total Memory) slowly
>increases,
>but never goes back down.  According to the Runtime javadoc, this is
the
>total amount of memory in the JVM.  Will this continue to increase?
What
>happens when it hits the Maximum memory amount?  Should I be concerned
>about
>this?

It will continue to increase as needed until and unless it hits a
specified boundary, e.g. the amount you specify in -Xmx plus system
memory overhead (e.g. the stack and symbol table).

If all available memory is allocated and more memory is requested, you
will get a java.lang.OutOfMemoryError.

Should you be concerned about this?  Of course ;)  You should always
know how much memory your system requires to handle its expected loads,
and you should configure your system according to this knowledge.  For
example, why did you pick 256MB maximum?

Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to