Tuning WebLogic JRockit with WebLogic Server on Linux
This section describes how to start up and configure the BEA WebLogic JRockit JVM. It also provides some background on selecting and running both a thread system and a memory management system (called a "garbage collector"). This section includes information the following subjects:
You can start BEA WebLogic JRockit either from the command line or from the WebLogic Server's Node Manager. This section describes both methods.
Before starting WebLogic JRockit JVM, ensure that you have the following directory set in your PATH environment variable:
<jrockit-install-directory>/bin
(where <jrockit-install-directory>
is the folder where you installed WebLogic JRockit, such as c:/bea/jrockit81_141_02/
.)
To start the JVM, at the command line enter on of the following:
java
and any tuning or configuration and tuning options you want to use; for example, you might start WebLogic JRockit JVM with the following command string:
java -verbose -Xgc:gencopy -Xms:64 -Xmx:512 -Xns:64 -Xnopt myClass
Here, the standard configuration parameter -Verbose
requests verbose output from the system and the non-standard option -Xgc:gencopy
sets the generational copying memory management system (the "garbage collector"). The tuning parameters -Xms:64 and -Xmx:512 set the minimum (-Xms
) and maximum (-Xmx
) heap sizes, while the tuning parameter -Xns:64
set the size of the young generation (the "nursery"; required for generational collectors). myClass
identifies the class that contains the main()
method and is required whenever you start WebLogic JRockit.
All of the options in this example—along with others—are described in Configuring WebLogic JRockit JVM by Using Command Line Options, below, or in Tuning WebLogic JRockit JVM with WebLogic Server on Linux.
Note: You can also start JRockit from the command by specifying a fully-qualified path to the file; for example, enter:
<jrockit-install-directory>
/bin/java
You can also start WebLogic JRockit JVM from the WLS Node Manager. To do this, access the Node Manager and go to the Remote Start Page. In the Java Home field, enter the fully-qualifying path, as suggested in the example above. For more information on using the Node Manager, please see Overview of Node Manager in Configuring and Managing WebLogic Server.
Configure WebLogic JRockit JVM by using a number of standard and non-standard command line options that you enter at startup. These options work with WebLogic JRockit on all supported operating systems; none are specific to Linux.
If you start WebLogic JRockit JVM from the Remote Start page of the WLS Node Manager, simply enter the options, with the appropriate arguments, in the Arguments field on the Remote Start page. For more information on using the Node Manager,please see Overview of Node Manager in Configuring and Managing WebLogic Server. This section describes:
Standard command line configuration options work the same regardless of the JVM; in other words, these options work the same whether you are running WebLogic JRockit JVM, Sun Microsystem's HotSpot JVM, or any other third-party JVM.
The following standard command line options set general information about WebLogic JRockit JVM:
-classpath <
directories and zips/jars separated by :>
Tells the VM where to look for classes and resources. Alternately, you can use the option -cp
to represent -classpath
; for example:
-D<name>[=<value>]
The following options determine if the system will provide messages to the operator and what the form and content of those messages should be.
-version
-showversion
-verbose[:<
components separated by ,>]
Tells JRockit to display verbose output. This option is used mainly for debugging purposes and causes a lot of output to the console. Supported components are memory
, load
and codegen
. If no component is given, JRockit will display verbose information on everything.
-help
-X
The non-standard, or -X
, command line options are options that are exclusive to WebLogic JRockit JVM that change the behavior of WebLogic JRockit JVM to better suit the needs of different Java applications. Non-standard options are used extensively with thread system and memory management. These options normally won't work on other JVMs (conversely, the non-standard options used by other JVMs normally won't work with WebLogic JRockit).
Warning: Since these options are non-standard, they are subject to change at any time.
The following non-standard options define general WebLogic JRockit JVM behavior:
-Xverbose
-Xverbose
causes WebLogic JRockit to print to the screen specific information about the system. The information displayed depends upon the parameter specified with the option; for example, specifying the parameter cpuinfo
displays information about your CPU and indicates whether or not the JVM can determine if hyper threading is enabled. The valid parameters for -Xverbose
are: .
codegen —
The names of each method that is being compiled.cpuinfo
—
Any interesting information about your CPUs. load —
The names of each loaded class. memory; gc —
Information about the memory management system, including:opt —
Information about all methods that get optimized.For descriptions and examples of the information these parameters display, please refer to Table 3-1 in Starting and Configuring WebLogic JRockit JVM (found in Using WebLogic JRockit 8.1 SDK).
The thread system allows WebLogic JRockit JVM to take optimal advantage of the underlying operating system. WebLogic JRockit JVM supports two types of thread systems:
For more information on native and thin threads and on how to select a thread system that best meets your needs, please refer to Choosing the Thread System in Using WebLogic JRockit 8.1 SDK.
To start a thread system, include one of the options listed in Table 2-1 when you start WebLogic JRockit JVM:
WebLogic JRockit JVM manages memory by employing four different garbage collectors. These collectors work during runtime to clear the memory heap of expired objects, or "garbage." The four garbage collectors are:
For information and tips on selecting a garbage collector, please refer to Choosing a Garbage Collection Method in Using WebLogic JRockit 8.1 SDK.
To start a garbage collector, simply include at the command line the -Xgc
option and the type of collector you want to use, as shown in Table 2-2.
When started, JRockit will run with the specified garbage collector.
If the garbage collector has not been set and the maximum heap size (set by using -Xmx
or by using the default, as described in Setting the Maximum Heap Size) is less than 128 MB, the default garbage collector is generational copying (-Xgc:gencopy
); otherwise the default is parallel (-Xgc:parallel
).
-Xgcreport
-Xgcreport
causes WebLogic JRockit JVM to print a comprehensive garbage collection report at program completion. The option -Xgcpause
causes the VM to print a line each time Java threads are stopped for garbage collection. Combining the two is a very good way of examining the memory behavior of your application.