Taking Advantage of Multiple CPU Machines

The -XX:+AggressiveHeap option inspects the machine resources (size of memory and number of processors) and attempts to set various parameters to be optimal for long-running, memory allocation-intensive jobs. Basically, this option instructs the JVM to push memory use to the limit. It was originally intended for machines with large amounts of memory and a large number of CPUs, but in the J2SE platform, version 1.4.1 and higher. it has shown itself to be useful even on four processor machines. With this option the throughput collector (-XX:+UseParallelGC) is used along with adaptive sizing (XX:+UseAdaptiveSizePolicy). Since this option sets the heap size, do not use it with -Xms or -Xmx options.

Note:

You may want to use the -XX:+AggressiveHeap option as a tool to find out what the max heap can be set to on a particular machine. Then use the –XmsNNNm and -XmxNNNm options to hard code the max heap. Also –Xms should always equal –Xmx the reason is to stop the JVM from constantly resizing the heap which takes up resources.


iWay Software