Marcel Mitran, an IBM Distinguished Engineer working on Java, asked me
to post this in response to this thread:
"Andrew's advice is sound. Over-allocating the Java heap is not
desirable for many reasons. The JVM's heap and gc policies should
be appropriately tuned. For batch applications, where longer pause-times
are typically okay to trade-off in exchange for
minimal CPU and elapsed time execution, the optThroughput or gencon
policies are likely most appropriate
(http://www.ibm.com/developerworks/library/j-ibmjava2/). IBM Health
Center offers some pretty good tooling to help tune
the garbage collector
(http://www.ibm.com/developerworks/java/jdk/tools/healthcenter/)."
and...@blackhillsoftware.com (Andrew Rowley) wrote:
I have seen the advice to avoid garbage collection in batch from IBMers
before. I don't understand it, and I am curious to know where it is
coming from. I doubt it is endorsed by the JVM developers. I suspect it
might just be that suddenly we can measure memory management overhead,
where it is more difficult in other languages.
Garbage collection is Java's way of returning unused memory for reuse.
You could reduce memory management overhead of a batch C++ program by
removing all delete statements, and increasing the virtual storage
available until it never ran out. You COULD, but no-one would recommend
it as good practice. Overallocating the heap to avoid garbage collection
is basically the same thing.
<snip>
--
John Eells
z/OS Technical Marketing
IBM Poughkeepsie
ee...@us.ibm.com
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN