Ben J. Christensen

Software Development and Other Random Stuff

Java JDK 1.5 vs 1.6 Performance

In a benchmarking of our server software I found about a 34% speed improvement (if my math is correct) on using JDK 1.6.0_12 over JDK 1.5.0_17.

picture-8

Filed under: Performance

6 Responses

  1. saad says:

    Can you provide the environment you tested in? What tests were run? Sample size, etc?

    • Ben Christensen says:

      Machine:

      Amazon EC2 Large Instance 7.5 GB of memory, 4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each), 850 GB of instance storage, 64-bit platform

      http://aws.amazon.com/ec2/#instance

      [root@domU-12-31-39-02-D9-01 mnt]# uname -a

      Linux domU-12-31-39-02-D9-01 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:34:28 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

      [root@domU-12-31-39-02-D9-01 mnt]# cat /proc/cpuinfo

      model name : Dual-Core AMD Opteron(tm) Processor 2218 HE
      cpu MHz : 2599.998
      cache size : 1024 KB

      As for the tests, they are a proprietary application that I can’t provide, but it is a java client application running as a standalone java process connecting via RMI to a standalone java process acting as the server.

      JVM arguments for the server are:

      $JAVA_HOME/bin/java -server -Xms1g -Xmx6g -XX:MaxPermSize=128m -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:../logs/gc.log -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dcom.sun.management.jmxremote -cp $CLASSPATH APPLICATION_CLASS_HERE >> ../logs/console.log 2>&1 &

      The client JVM args are:

      $JAVA_HOME/bin/java -Xmx128m -cp $CLASSPATH APPLICATION_CLASS_HERE

      Each request/response is ranging in size from 5kb to 50kb transported over RMI.

      Each execution of the test executed 528 samples (the number is derived from a standard dataset used for the tests, hence the reason it’s not exactly 500 or something similar).

      This is by no means a fully scientific test, but it is “real-world” for the application I was testing.

      Ben

  2. Ramesh says:

    Great Ben for posting…Its very useful for myself…Thanks for posting…

  3. beingoneself says:

    nice…

  4. Rengasami Ramanujam says:

    Hey Nice comparison man!! But any idea why this subtle difference in JDK 1.6 in terms of performance?Is this comparison done for same code compiled with JDK 1.5 and JDK 1.6? If its same code then its really something interesting :)

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Twitter Updates

View Ben Christensen's profile on LinkedIn
Follow

Get every new post delivered to your Inbox.