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:
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.
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.
-classpath <directories and zips/jars separated by
-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
codegen. If no component is given, JRockit will display verbose information on everything.
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).
-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.
—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 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:
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.
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 (
-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.