one.fonda.java
Class BenchmarkRmi

java.lang.Object
  |
  +--one.fonda.java.BenchmarkRmi

public class BenchmarkRmi
extends Object

Benchmarks for call invocation with Java RMI. The results of this test are meant to be compared to the benchmark results for remote event passing in BenchmarkREP.

Four tests are performed with this class.

  1. The call latency test measures the latency when making calls to a no-argument, void function of a remote object.
  2. The call throughput test measures the throughput when making calls to a no-argument, void function of a remote object.
  3. The event latency test measures the latency when making calls to a remote object method that accepts and returns a RemoteEvent.
  4. The event throughput test measures the throughput when making calls to a remote object method that accepts and returns a RemoteEvent.

Each test requires a client and a server running on two separate machines. The call latency client makes a number of calls to a remote object and computes latency statistics. The call latency server provides the remote object for this test. The call throughput server is a remote object which counts the number of times it is called and computes throughput statistics. The call throughput client makes those calls. The event latency and throughput tests are similar. When a test completes, the average and standard deviation of the results are printed to standard output.

Each server or client may be run from the command line as follows.

java -Djava.security.policy=${JAVA_DEV_ROOT}/src/one/fonda/java/rmi.policy one.fonda.java.BenchmarkRmi cls objectName

Runs the Call Latency Server, binding to the specified name in a registry running on the local host. The server exports a method which is a no-op.

java one.fonda.java.BenchmarkRmi clc remoteHost objectName [numTests numCalls]

Runs the Call Latency Client, locating a remote object with the given name in the registry on the given remote host. The default number of tests is 100, with 1000 calls per test. The calls are made sequentially; the time reported is that required for numCalls calls to be completed.

java -Djava.security.policy=${JAVA_DEV_ROOT}/src/one/fonda/java/rmi.policy one.fonda.java.BenchmarkRmi cts objectName [numTests numCalls]

Runs the Call Throughput Server, binding to the specified name in a registry running on the local host. the default number of tests is 100, with 1000 calls per test. Each time the server's exported method is invoked, it counts that as a method call. The time reported is that required for numCalls calls to be received.

java one.fonda.java.BenchmarkRmi ctc remoteHost objectName [numThreads]

Runs the Call Throughtput Client, locating a remote object with the given name in the registry on the given remote host. The number of threads from which to make remote method invokations is given by numThreads; the default is 1. Because RMI method calls are synchronous, multiple threads may be required to stress the server. The number of threads required should be tuned by the person performing the benchmark.

java -Djava.security.policy=${JAVA_DEV_ROOT}/src/one/fonda/java/rmi.policy one.fonda.java.BenchmarkRmi els objectName

Runs the Event Latency Server, binding to the specified name in a registry running on the local host. The server exports a method which accepts and returns a RemoteEvent.

java one.fonda.java.BenchmarkRmi elc remoteHost objectName [numTests numCalls]

Runs the Event Latency Client, locating a remote object with the given name in the registry on the given remote host. The default number of tests is 100, with 1000 calls per test. The calls are made sequentially; the time reported is that required for numCalls calls to be completed.

java -Djava.security.policy=${JAVA_DEV_ROOT}/src/one/fonda/java/rmi.policy one.fonda.java.BenchmarkRmi ets objectName [numTests numCalls]

Runs the Event Throughput Server, binding to the specified name in a registry running on the local host. the default number of tests is 100, with 1000 calls per test. Each time the server's exported method is invoked, it counts that as a method call. The time reported is that required for numCalls calls to be received.

java one.fonda.java.BenchmarkRmi etc remoteHost objectName [numThreads]

Runs the Event Throughtput Client, locating a remote object with the given name in the registry on the given remote host. The number of threads from which to make remote method invokations is given by numThreads; the default is 1. Because RMI method calls are synchronous, multiple threads may be required to stress the server. The number of threads required should be tuned by the person performing the benchmark.

Version:
$Revision: 1.4 $

Inner Class Summary
static class BenchmarkRmi.CallLatencyServer
          The implementation for the remote object used in call latency tests.
static interface BenchmarkRmi.CallServer
          The interface for the remote object used in call tests.
static class BenchmarkRmi.CallThroughputServer
          The implementation for the remote object used in call throughput tests.
static class BenchmarkRmi.EventLatencyServer
          The implementation for the remote object used in latency tests.
static interface BenchmarkRmi.EventServer
          The interface for the remote object for the event tests.
static class BenchmarkRmi.EventThroughputServer
          The implementation for the remote object used in throughput tests.
 
Constructor Summary
BenchmarkRmi()
           
 
Method Summary
static void main(String[] args)
          Runs the test.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BenchmarkRmi

public BenchmarkRmi()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Runs the test.


(C) Copyright 2001 UW CSE