Wednesday, December 07, 2005

JVM Performance Comparison.

Java is everywhere these days, cell phones, servers and our desktops all use it to some extent. One thing a lot of people over look is the JVM and its effects on performance of your applications. While for small devices and desktops the choice is limited, usually either proprietary or Sun, servers have more flexability. Two of the most popular across all uses and platforms are Sun "Hot Spot" and BEA JRockit. Here I put these two head to head, while my tests are not all encompasing I think they will give a rough idea about how these two run in a "normal developer desktop" environment. The desktop and server tests I performed focused on memory footprint. The compilation test I ran focuses on CPU usage.

Test Box:
AMD Athlon XP 3000+ (400 FSB)
MSI nForce 2 400 Ultra Motherboard
Western Digital 80GB SE Hard Drive
Debian Sarge (Unstable) Kernel 2.6.14

Desktop Tests:

Azureus Bittorrent Client
* No torrents running

Eclipse IDE 3.1.1 Build M20050929-0840
* One project open with 3 Java sources

Server Test:

Atlassian Confluence 2.0.1 Build 321 (standalone)
* Uses Tomcat 4.1.27
* One user, two spaces created

Compilation Test:

Java Performance Test 1.0
* Runs a Ant Build
* Apache Ant 1.6.2


Sun Java "HotSpot"

java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)


Virtual (Swap + Res): 369m Resident (Code + Data): 54m Shared: 23m

Eclipse IDE:

508m 94m 30m


488m 190m 19m

Java Performance Test 1.0

Build Time: 20 Seconds


BEA JRockit

java version "1.5.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
BEA JRockit(R) (build dra-45238-20050523-2008-linux-ia32, R25.2.0-28)


Virtual (Swap + Res): 202m Resident (Code + Data): 74m Shared: 6692k


366m 135m 6880k


364m 224m 1748k

Java Performance Test 1.0

Build Time: 24 seconds



It seems that in the memory usage department JRockit comes out fairly far ahead, but for the more CPU intensive compilation test Sun has a lead. As I said before this not by any means an all inclusive test, just more of an example of the system footprint I experienced. In all cases there are more things at work than just the JVM. The code, application server, CPU (AMD, Intel, x86, x86-64), even down to the version of Ant will all make a difference in these numbers.

More info:
J2EE Application Server Comparison

BEA vs. Sun JVM Article

A Sun Engineer's Blog and Comparison


Post a Comment

<< Home