IBM Israel
Skip to main content
 
Search IBM Research
   Home  |  Products & services  |  Support & downloads  |  My account
Select a Country Select a country
IBM Research Home IBM Research Home
IBM Haifa Labs Homepage IBM Haifa Labs Home

Cluster Virtual Machine for Java

Distributed Computing Systems
Project Homepage
 ·Overview
 ·Motivation
 ·Application Model
 ·Approach
 ·Benchmark Results
 ·Optimizations
 ·Status
 ·Related Works
 ·Papers
 ·Contact Information
Feedback


Optimizations
  Overview

To obtain scalability, Cluster VM for Java uses optimizations based on three principles:
  • Employ a large number of mostly simple optimizations that address caching, locality of execution, and object migration.
  • Take advantage of the Java semantics and of common usage patterns in implementing the optimizations.
  • Use speculative optimizations, taking advantage of the fact that the Cluster VM for Java run time environment can correct false speculations.

Cluster VM for Java optimizations focus on reducing the quantity of communication by enhancing data locality. These optimizations are divided into the following categories:
  • Those that use caching techniques.
  • Those that attempt to optimize where a method is invoked.
  • Those that attempt to optimize the placement of objects.

The primary benefit is not from any isolated optimization, but rather from the synergy that results from using a large set of optimizations at the same time.

Caching techniques focus on data that is not mutated during a given program execution. We look at data at the level of classes, objects, and even individual object fields. These caching optimizations can provide the biggest performance benefit when used in concert with invocation optimizations.

Invocation optimizations address the issue of where a particular method should be executed, going beyond the generic approach of always executing a method at the master object. Cluster VM for Java address three types of methods for this optimization: class methods, which are always executed locally, instance stateless method, which also are always executed locally, and locally executable methods, which are executed locally until conditions change.

Placement optimizations attempt to place newly created objects on the node where they will be used. In addition, they migrate objects to enhance their locality with respect to the thread using the object.

The optimizations of Cluster VM for Java are almost all speculative. They utilize knowledge of Java semantics (e.g., the heap accesses performed by a method) and data usage patterns (e.g., the typical usage of static data) extracted by analyzing the bytecodes during class loading to determine which optimization to apply on which datum. To handle cases where a heuristic decision was wrong, the optimizations are augmented with invalidation protocols.

We chose not to use the alternative of update-based protocols because of (1) the large overhead of update-based schemes compared with invalidation-based ones and (2) the repetitive nature of our target Java Server Applications implies that once a datum is accessed in such a way that it conflicts with an optimization, it will continue to be accessed in the same way. In addition, we were careful in the design of our invalidation protocols so that the number of invalidations required has a worst case bound that is a function of the size of the code, independent of the number of objects created at run-time. Because the number of invalidations is bounded by the size of the code, the amortized cost for invalidation becomes insignificant the longer the program executes. This is important when working with invalidation-based protocols.

All our optimizations follow a sequential consistency memory model that is more conservative than the memory model required by Java. Thus, they maintain Cluster VM for Java as a standard JVM, providing a single system image on a cluster. Moreover, this memory model makes the optimizations simple to implement while their correctness can be easily validated. More explanations are given in the following sections in the context of specific optimizations.

 

  About IBM  |  Privacy  |  Legal  |  Contact