JRockit for Windows and Linux User Guide
|
Understanding JRockit
Certain concepts exist that are unique to JRockit and JVMs in general Understanding these concepts will help you use JRockit more successfully and take advantage of its full capabilities. This section includes information on the following subjects:
Code Generation
Code generation is the process of converting Java code to assembly language. JRockit contains a very good optimizing JIT compiler with cutting-edge performance. It is unique because it doesn't perform bytecode interpretation at all, instead everything is compiled. While this can lead to slightly longer startup times, the long-term result is faster performance for typical server-side applications.
Memory Management
JRockit manages memory by employing four different garbage collectors. These collectors work during runtime to clear the memory stack of expired objects, or "garbage." JRockit's four garbage collectors are:
- Generational Stop 'n' Copy, which divides the memory into two or more areas called "generations." Instead of allocating objects in one single space and garbage collecting that whole space when it gets full, most of the objects are allocated in the "young generation", called the nursery.
- Single-Spaced Concurrent, one of two types of concurrent collectors, which does its work in parallel with ordinary processing; that is, it does not stop all Java threads to do the complete garbage collection. This is designed to support garbage collection without disruption and to improve multiprocessor garbage collection performance.
- Generational Concurrent is the second type of concurrent collector JRockit employs. Although very similar to a single-spaced concurrent collector, a generational concurrent garbage collector does its actual object allocation in a "nursery," reducing the need to do collection of the entire heap so often.
- Parallel garbage collection, which stops all Java threads and uses every CPU to perform a complete garbage collection of the entire heap.
To implement and configure a garbage collector, see Configuring the JRockit Memory Management System.
Threads
BEA WebLogic JRockit can use one of two thread systems to maximize processing:
- High Performance Threading System, or thin threads, wherein multiple Java threads are run on a singe operating system thread. This allows JRockit to optimize thread scheduling, thread switching, and thread synchronization, while using less memory.
- Native Threads which maps Java threads directly to the operating system threads, directly taking advantage of the operating system's thread scheduling and load balancing policies. Native Threads is the default thread system for BEA WebLogic JRockit.
To implement and configure a Thread system, see Configuring the JRockit Thread System.