Posted by
Albert Cardona on
Jun 12, 2009; 10:03pm
URL: http://imagej.273.s1.nabble.com/A-note-on-JVM-performance-tp3692131p3692132.html
Grant Harris wrote:
> All you need to do is add -server to the java.exe arguments. I'd like to
> hear if anyone finds a marked improvement in using ImageJ.
> Cheers.
> -- Grant Harris, MBL
>
More performance hints:
* When working with large heap sizes, be aware that the initial minimum
heap size (defined by -Xms) will be duplicated until it reaches the
maximum heap size (as defined by -Xmx). This heap duplication is costly
and sometimes generates OutOfMemoryError.
To avoid it, launch the JVM with fixed heap size, for example 4Gb:
java -Xms4000m -Xmx4000m
* In multicore CPUs, switch on the incremental garbage collection, which
helps immensely to avoid heap buildup and long pauses:
java -Xincgc
* Disable explicit calls to System.gc(), which trigger the garbage
collection for no good reason (that was only useful in very old,
not-so-effective JVMs):
java -XX:+DisableExplicitGC
For fiji, combine all the above with:
./fiji -server -Xms4000m -Xmx4000m -Xincgc -XX:+DisableExplicitGC --
(Note the double hyphen at the end, to separate JVM arguments from
ImageJ arguments.)
Albert
--
Albert Cardona
http://albert.rierol.net