JatMark — Java Performance Benchmark

Updated: 2008-08-15

What is this?

JatMark is Java benchmark I created some time ago to see what differences in performance there are between various JVM implementations, as well as to see how continuous efforts of Intel and AMD to top each other translate to increase of computing power available to Java programmer.

JatMark is fairly complex benchmark, touching different aspects of compute-bound performance, so if your interest is in intensive computation, you may wish to give it a glance. Look below for further details of its operations.

Download

ZIP archive suitable for all platforms. README file with instructions inside.

How to run it

Open a shell (your OS has one, right?) and type

java -Xmx256m -jar JatMark.jar bunny.xml
in the directory where you unpacked the archive. On UNIX systems you should prefix it with "time" command to measure how many JatMarks you have (JatMark is a number of seconds spent on computation — the lower, the better). I am not sure how to precisely measure time on Windows — suggestions anyone?

Author

Miloslaw Smyk. Send me your benchmark results to thorgal at wfmh dot org dot pl.

Results

Here is a chart of results I've collected so far (click to enlarge). They are also available in text form.

Future

Well, this version of JatMark is based on code which is circa 2004. I could in theory build something out of current sources of the renderer that JatMark is an outgrowth of and call it say, JatMark 2007. It would support many more effects, faster rendering and, most importantly, multithreading. However, I will first wait to see if there is any interest at all in Java benchmarks of this type.

Motivation and details of operation

Below is a copy of a letter I've sent to various hardware testing sites in hope that they would include JVM benchmarking in their reviews. Not much came out of it and I still have to guess what this year's Quake FPS count means for Java performance. At least I tried...

Dear Hardware Reviewers,

While there are many hardware testing sites, me and many of my programmer friends find it difficult to make an informed choice based on your reviews. Why is that? Mostly because the benchmarks most of you use give little insight into Java performance on particular platform. Java is of course very well known for its server-side strenghts, but in recent times it is becoming increasingly popular in fields of technical/scientific computing as more and more people in physics/math/simulation research communities turn to Java for its portability, quick development time and easy debugging. Java is also a part of many university curriculums and most current to-be programmers will encounter it as their first language.

Unfortunately, while relative performance of different CPUs _and_ different Java virtual machines is usually known, it's still difficult to apply facts like "AMDs excell at FP" and "Intel is better at memory intensive operations" to Java, as implementation details of particular JVM pretty much decide how these strengths are actually utilized.

In order to rectify the situation somewhat, I'd like to propose a new benchmark, which -- while obviously can't be claimed to magically express Java performance in just one number -- still stresses JVM in sufficiently many areas to draw conclusions on its overall performance regarding computationally intensive processes.

The benchmark is easy to use and is based on the actual application I wrote for my PhD research, so it definitely cannot be claimed to be of "synthetic" variety.

What it does is to render a single image of moderately complex scene (~70K faces) using advanced global illumination algorithms. Specifically, it performs following steps (it's a bit technical, you may wish to skip this part):

  1. Loads scene description and object dataset using XML and text file parsers.
  2. Computes average vertex normals, which are used later for Phong interpolation.
  3. Prepares ray traversal data structures to decrease the number of ray-object intersection tests (two-level hierarchical grid is used).
  4. Emits global and caustic photons from area light source using Quasi Monte Carlo techniques (Halton sequence) and stores them in density-controlled photon maps based on KD-trees.
  5. Converts KD-trees to heap representation and balances them.
  6. Precalculates the irradiance estimates at photon hit points using convex hull "gift wrapping" algorithm.
  7. Performs the first rendering pass which calculates irradiance values at important locations using final gatherings with 310 rays.
  8. Performs the second rendering pass which is using distributed ray tracing (to compute soft shadow from area light source), irradiance interpolation (Ward's algorithm) and direct caustic estimation to generate final image.
  9. Processes the image with tone mapping operator (simple gamma correction)
  10. Stores the result in a PNG file. The image can be used to verify that the test succeeded.
All pixels are adaptively antialiased with maximally 41 rays.

If you need more technical details I would be happy to provide them, but what it all boils down to is that the renderer:

JatMark number is simply the total number of seconds spent on the computation and on my machine (Athlon Thunderbird B 1GHz overclocked to 1.1GHz) is equal to 1599. Unfortunately, Java does not allow the measurement of actual CPU time used (as opposed to wall clock time), but most operating systems provide easy means to do it (e.g. "time" command in Linux and MacOS X).

The final, important issue to be discussed is the choice of JVM to be used in testing, as they obviously differ (sometimes significantly) in their performance. The first constraint here is that the benchmark requires version 1.4.0 or newer, as it uses ImageIO class package among other things. Another is that we would preferably see it running on as many systems as possible. So, Sun's 1.4.1 seems to be the most reasonable choice, even though IBM's 1.4.0 is around 25% faster. In any case, I guess it would be desirable to pair particular JatMark result with name of JVM used to obtain it, as JatMark is in fact the measurement of particular JVM's performance on given platform.

This is more or less it. JatMark is freely downloadable from

http://wfmh.org.pl/~thorgal/jatrac/JatMark.zip

The archive contains README file that explains how to run the benchmark, but should you have problems running it, please don't hesitate to ask me for help.

Best Regards,
Miloslaw Smyk

ACKNOWLEDGMENT NOTICE

JatMark uses "Stanford Bunny" 3D object, which comes from Stanford University Computer Graphics Laboratory and was obtained with Cyberware scanner (see http://graphics.stanford.edu/data/3Dscanrep/#bunny for more information).