Skip navigation.
Downloads | Product Documentation | Support

Using WebLogic JRockit 8.1 SDK

# Using WebLogic JRockit JVM with Other WebLogic Applications

The configuration options described elsewhere in this user guide can be set to optimize WebLogic JRockit JVM performance with both BEA WebLogic Server and BEA WebLogic Workshop. This chapter defines these optimal settings and discussed how to use the JVM with these applications. It includes information on the following subjects:

- Using WebLogic JRockit JVM with BEA WebLogic Server
- Configuring JRockit for BEA WebLogic Workshop

# Using WebLogic JRockit JVM with BEA WebLogic Server

BEA WebLogic JRockit JVM is certified for use with BEA WebLogic Server. This section includes information on the following subjects:

- Certified Versions
- Verifying that WebLogic JRockit is Your JVM
- Starting JRockit from the Node Manager
- Enabling the Management Server from the Node Manager
- Tuning WebLogic JRockit for WebLogic Server
- Setting Options by Using the Node Manager
- Monitoring WebLogic JRockit JVM from WebLogic Server
- Running JRockit with Thin Threads on WebLogic Server
- Switching to WebLogic JRockit JVM in WebLogic Server
- Switching VMs When WebLogic Server is Running as a Service

## Certified Versions

For details on certified and supported platform combinations of WebLogic Server with WebLogic JRockit 8.0, please refer to the following Web pages:

>     http://www.bea.com/products/weblogic/server/

or

>     http://www.bea.com/products/weblogic/jrockit/

## Verifying that WebLogic JRockit is Your JVM

WebLogic JRockit is the default production JVM shipped with WebLogic Server, although you can use another VM, such as Sun Microsystem's HotSpot JVM as a development VM. To ensure that WebLogic JRockit is the JVM running with your instance of WebLogic Server, at the command line, type:

>     java -showversion

If WebLogic JRockit is running, the system will respond:

>     java version "1.4.1_05"
>     Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_05)
>     BEA WebLogic JRockit(R) Virtual Machine (build
>     8.1-1.4.1_05-win32-CROSIS-20030317-1550, Native Threads, Generational
>     Concurrent Garbage Collector)

Note: This example assumes you are using the native thread method (the default) and generational concurrent garbage collector (default when maximum heap size is larger than 128 MB).

## Starting JRockit from the Node Manager

If you are starting WebLogic JRockit JVM from the WLS Node Manager, you need to enter the fully-qualifying path, as shown above, in the Java Home field on the Remote Start Page; for example:

>     \bea\jrockit81_141\bin\java

## Enabling the Management Server from the Node Manager

You can enable the management server from the WLS Node Manager by doing the following:

1. Start the Node Manager as described in Starting Node Manager with Commands or Scripts and navigate to the Remote Start page.
2. Ensure that you have specified an absolute pathname to WebLogic JRockit JVM's top-level directory in the Java Home field
3. In Arguments, type `-Xmanagement`.

For more information on using the Node Manager, please refer to the Overview of Node Manager in Configuring and Managing WebLogic Server.

## Setting Options by Using the Node Manager

If you started the server or cluster of servers with the Node Manager and specified an absolute pathname to WebLogic JRockit JVM's top-level directory in the Java Home field on the Node Manager's Remote Start page, you can set any option from this page, too. Simply enter the option and any arguments in the Arguments field.

For more information on using the Node Manager, please refer to the Overview of Node Manager in Configuring and Managing WebLogic Server.

## Tuning WebLogic JRockit for WebLogic Server

To use the WebLogic JRockit JVM instead of the Sun JVM, you need to increases the initial heap size to 64 MB (`-Xms:64m`)and the maximum heap size to at least 200 MB (`-Xmx:200m`). In addition, the following defaults are used:

- `-Xnativethreads`
- `-Xallocationtype:local`

These settings are normally used for initial development. If you want to improve WebLogic JRockit performance, you can try one of the following, bearing in mind that all applications are different and you need to verify which settings give the best performance in each case:

- Increase the heap initial and maximum size (`-Xms` and `-Xmx`).
- Change the garbage collector to single spaced concurrent (`-Xgc:singlecon`) or parallel (`-Xgc:parallel`). Note that if you select parallel as your garbage collector, the `-Xns` setting will have no affect on processing (see Setting the Size of the Nursery).

For more information on tuning WebLogic JRockit, please refer to Tuning WebLogic JRockit JVM.

## Monitoring WebLogic JRockit JVM from WebLogic Server

If you run WebLogic Server with WebLogic JRockit JVM, you can use the WebLogic Server Administration Console to view runtime data about the VM and the memory and processors on the computer hosting it.

To monitor WebLogic JRockit JVM, do the following:

1. Start WebLogic Server with WebLogic JRockit JVM as the VM.
2. In the left pane of the Administration Console, expand the Servers folder.
3. Click a server that is using the WebLogic JRockit JVM.
4. In the right pane, click the Monitoring tab. Then click the JRockit tab.

The JRockit tab displays monitoring information.

Table 7-1 WebLogic JRockit Attributes Monitored by the WebLogic Server Administration Console

Attribute | Description
--- | ---
Total Nursery Size | Indicates the amount (in bytes) of memory that is currently allocated to the nursery. The nursery is the area of the Java heap where objects are initially allocated. Instead of garbage collecting the entire heap, generational garbage collectors focus on the nursery. Because most objects die young, most of the time it is sufficient to garbage collect only the nursery and not the entire heap. If you are not using a generational garbage collector, the nursery size is 0.
Max Heap Size | Indicates the maximum amount of memory (in bytes) that the VM can allocate for its Java heap. This number is fixed at startup time of the VM, typically by the`-Xmx` option.
Gc Algorithm | Indicates the type of garbage collector that WebLogic JRockit JVM is using.
Total Garbage Collection Count | Indicates the number of garbage collection runs that have occurred since the VM was started.
GCHandles Compaction | Indicates whether the VM's garbage collector compacts the Java heap. Usually the heap is scattered throughout available memory. A garbage collector that compacts the heap defragments the memory space in addition to deleting unused objects. Values: true false
Concurrent | Indicates whether JRockit's garbage collector runs in a separate Java thread concurrently with other Java threads. Values: true false
Generational | Indicates whether JRockit's garbage collector uses a nursery space. Instead of garbage collecting the entire heap, generational garbage collectors focus on the nursery. Because most objects die young, most of the time it is sufficient to garbage collect only the nursery and not the entire heap. Values: true false
Incremental | Indicates whether JRockit's garbage collector collects only a small portion of the heap during each old collection (incremental) or collects the whole heap during each collection (non-incremental). Values: true false
Parallel | Indicates whether the JRockit's garbage collector is able to run in parallel on multiple processors if multiple processors are available. Values: true false
Number Of Processors | Displays the number of processors on JRockit's host computer. If this is not a Symetric Multi Processor (SMP) system, the value will be 1.
Total Number Of Threads | Indicates the number of Java threads (daemon and non-daemon) that are currently running on JRockit across all processors.
Number Of Daemon Threads | Indicates the number of daemon Java threads currently running on JRockit across all processors.

To view additional data about WebLogic JRockit, such as how long it spends in a specific method, use the WebLogic JRockit Management Console, as described in Using the WebLogic JRockit JVM Management Console.

## Running JRockit with Thin Threads on WebLogic Server

Warning: Thin threads is experimental functionality in this version of JRockit, and is not recommended for general use. This feature is subject to change without notice.

The JRockit high performance thread system (Thin Threads, `-Xthinthreads`) and the native I/O system of WebLogic Server are incompatible as they both use asynchronous I/O. To avoid problems you must disable the native I/O system of WebLogic Server when running JRockit using thin threads. The native I/O is disabled automatically in WebLogic Server if JRockit is using thin threads, even if it is turned on in the corresponding WebLogic Server configuration file. In their respective default setups, WebLogic JRockit JVM does not use thin threads and WebLogic Server uses native I/O.

## Switching to WebLogic JRockit JVM in WebLogic Server

When you switch to WebLogic JRockit JVM in WebLogic Server, any changes to the VM and start-up setting, should be handled by the WLS Configuration Wizard. Additionally, if any installation-wide scripts must be updated due to the switch, these will also be handled by the WLS Configuration Wizard.

Among information that needs to be changed when switching to WebLogic JRockit JVM are:

- The value for the `JAVA_HOME` variable needs to be changed to the absolute pathname to the top BEA directory; for example, `c:\bea\jrockit81`.

You can also change the `JAVA_HOME` variable from the Node Manager's Remote Start page by entering the absolute pathname in the Java Home field.

- Change the value of the `JAVA_VENDOR` variable to `BEA`.

You will also need to restart any servers that are currently running.

For complete details on switching to WebLogic JRockit JVM from another JVM, please refer to Migrating to WebLogic JRockit. For more information on using the Configuration Wizard when switching to WebLogic JRockit, please refer to Changing the JVM that Runs Servers.

## Switching VMs When WebLogic Server is Running as a Service

To switch the virtual machine when WebLogic Server is running as a service, do the following:

1. Stop the service.
2. Start `regedit` and find the service keys corresponding to your service

>     (HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services/{ServiceName}).

1. In the Parameters folder, change the value of the key JavaHome from the default VM to your WebLogic JRockit SDK directory.
2. Here you can also alter the arguments sent to the VM by editing the values of the key `CmdLine`.
3. Restart the service.

# Configuring JRockit for BEA WebLogic Workshop

If you are running JRockit with BEA WebLogic Workshop, we recommend that you use the same configuration parameters specified for WebLogic Server in Tuning WebLogic JRockit for WebLogic Server.