16.10.2015 Views

Getting Started with WebSphere Application Server

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

190 <strong>Getting</strong> <strong>Started</strong> <strong>with</strong> <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> Community Edition<br />

A value too high results in high memory consumption and a low number of major slow<br />

garbage collection cycles. A value too low results in a high number of minor fast garbage<br />

collection cycles.<br />

The goal of properly tuning the heap size is to minimize the overhead of GC to improve the<br />

server response and the throughput. The IBM JDK which comes <strong>with</strong> Community Edition<br />

allows you to change several parameters that are related to the heap size:<br />

• Initial heap size<br />

The initial heap size specifies the initial amount of memory that is allocated in the heap<br />

when the JVM starts.<br />

To set the initial heap size include the following option in the JAVA_OPTS<br />

environment variable where mem is the heap size in megabytes -Xmsm<br />

• Maximum heap size<br />

The maximum heap size specifies the maximum amount of memory that the JVM can<br />

use.<br />

To set maximum heap size, include the following option in the JAVA_OPTS<br />

environment variable where mem is maximum heap size in megabytes -Xmxm<br />

Table 10.1 shows the IBM JVM default heap size values on Linux and Windows.<br />

JVM setting Linux Windows<br />

Initial Heap Size (-Xms) 4 MB 4 MB<br />

Maximum Heap Size (-<br />

Xmx)<br />

Half the real memory <strong>with</strong> a<br />

minimum of 16 MB and a<br />

maximum of 512 MB<br />

Half the real memory <strong>with</strong><br />

a minimum of 16 MB and<br />

a maximum of 2 GB<br />

Table 10.1 - IBM JVM default heap size values<br />

• Heap <strong>with</strong> large pages<br />

Note:<br />

It is also possible to configure the IBM JVM to allocate the heap using large pages.<br />

Use the following option –Xlp<br />

For information about the JAVA_OPTS environment variable see<br />

http://publib.boulder.ibm.com/wasce/V2.1.1/en/javaopts.html<br />

You can add the JAVA_OPTS variable to the following files on Windows:<br />

/bin/geronimo.bat<br />

/bin/setenv.bat<br />

On Linux the filenames are the same but have a .sh extension.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!