| java.lang.Object org.cougaar.qos.qrs.sysstat.SysStatHandler org.cougaar.qos.qrs.sysstat.Jips
Jips | public class Jips extends SysStatHandler implements Runnable(Code) | | This is a JVM+Host microbenchmark facility designed to determine the CAPACITY
of a specific Java Virtual machine running on a specific host. We have found
that the version of JVM makes a big difference in the application
performance, orders of magnitudes, as well as the MIPS of the host. This
benchmark tries to unify the hosts BogoMIPS measures and JVM version.
Obviously to be valid the benchmark must be run under the same JAVA VM as the
application.
The goal is to measure JVM+host Capacity. We need to remove all the possible
sources of latency variation, such as clock granularity, OS scheduling,
memory swapping, and garbage collection. Given Java's clock granularity of 1
msec, we should run the test for at least 100ms to get 1% accuracy.
Unfortunately 100ms is longer than the OS scheduling increment, such as a
Linux Jiffy which is 10ms. NOTE RUNNING FOR A LONGER TIME DOES NOT HELP,
because OS scheduling other tasks, and garbage collection will then be
"averaged" into the measurements.
The scheme is:
1) Estimate the number of benchmark iterations that will run a test for
around 100ms.
2) Run COUNT tests with a SLEEP of msec between the tests. The sleep is to
help the benchmark process from being marked as greedy by the OS. Hence
sleeping reduces the probability of being preempted during the test by some
other job.
3) Pick the fastest time as best estimator for the maximum Capacity. Used to
pick the second fastest because the fastest might be a bad measurement (the
best seems fine)
4) Return JIPS (Java Instructions Per Second) Jips = (benchmarkIterations /
BestTime) * INST_PER_ITER
We have run benchmark on hosts with a load average of 10 and have got the
same Jips as when run with a unloaded host. This work despite an under
estimate of the number of iterations for 100ms.
Jips comes with with 3 built in benchmarks, You are encouraged to experiment
with others: 0 measures the overhead of the loop. 1 measures time to add two
integers (Default) 2 measures time to add two floats
Problems:
What if the application excapes to C code, such as array copy, sockets, or
compression?
|
Constructor Summary | |
public | Jips(int type) | public | Jips() |
COUNT | final public static int COUNT(Code) | | |
INST_PER_ITER | final public static int[] INST_PER_ITER(Code) | | |
MEM_SIZE | final public static int MEM_SIZE(Code) | | |
MEM_SIZE_MINUS_1 | final public static int MEM_SIZE_MINUS_1(Code) | | |
PERIOD | final public static double PERIOD(Code) | | |
SLEEP | final public static int SLEEP(Code) | | |
TYPE | final public static int TYPE(Code) | | |
Jips | public Jips(int type)(Code) | | |
estimateN | public int estimateN(int n, double target)(Code) | | |
incD | public void incD(double value)(Code) | | |
incI | public void incI(int value)(Code) | | |
incM | public void incM(int value)(Code) | | |
initialize | public void initialize(String host, int pid)(Code) | | |
printResults | public void printResults(double[] results)(Code) | | |
runTests | public double runTests(double target, int count, int sleepMsec)(Code) | | |
time | public double time(int n)(Code) | | |
Fields inherited from org.cougaar.qos.qrs.sysstat.SysStatHandler | final static String PROVENANCE(Code)(Java Doc)
|
|
|