views:

821

answers:

11

In another SO question I asked why my java programs run faster on AMD than on Intel machines. But it seems that I'm the only one who has observed this.

Now I would like to invite you to share the numbers of your local java performance with the SO community. I observed a big performance difference when watching the startup of JBoss on different hardware, so I set this program as the base for this comparison.

For participation please download JBoss 5.1.0.GA and run:

jboss-5.1.0.GA/bin/run.sh (or run.bat)

This starts a standard configuration of JBoss without any extra applications. Then look for the last line of the start procedure which looks like this:

[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: 
       SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 25s:264ms

Please repeat this procedure until the printed time is somewhat stable and post this line together with some comments on your hardware (I used cpu-z to get the infos) and operating system like this:

java version: 1.6.0_13
OS:           Windows XP
Board:        ASUS M4A78T-E
Processor:    AMD Phenom II X3 720, 2.8 GHz
RAM:          2*2 GB DDR3 (labeled 1333 MHz)
GPU:          NVIDIA GeForce 9400 GT
disc:         Seagate 1.5 TB (ST31500341AS)

Use your votes to bring the fastest configuration to the top.

I'm very curious about the results.

EDIT:

Up to now only a few members have shared their results. I'd really be interested in the results obtained with some other architectures. If someone works with a MAC (desktop) or runs an Intel i7 with less than 3 GHz, please once start JBoss and share your results. It will only take a few minutes.

+2  A: 
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: 
       SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 22s:848ms

java version: 1.6.0_13
OS:           Windows XP (32 Bit)
Board:        ASUS M4A78T-E
Processor:    AMD Phenom II X3 720, 2.8 GHz
RAM:          2*2 GB DDR3 (labeled 1333 MHz)
GPU:          NVIDIA GeForce 9400 GT
disc:         Seagate 1.5 TB (ST31500341AS)
tangens
+4  A: 
22:29:38,959 INFO  [ServerImpl] JBoss (Microcontainer) [5.1.0.GA 
(build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 17s:210ms

java version: 1.7.0-ea
OS:           Ubuntu 9.10, 64bit
Board:        ASUS P6T
Processor:    Intel i7 920 @ 3.4Ghz
RAM:          12GB DDR3
GPU:          Dunno

With boring old sun-java 1.6.0_15-b03:

22:32:12,360 INFO  [ServerImpl] JBoss (Microcontainer) [5.1.0.GA 
(build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 18s:532m

I'm glad I can do my day-to-day work on jetty, which starts in about 4 seconds.

krosenvold
+1  A: 
21:51:00,281 INFO  [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: 
       SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 46s:456ms

java version: 1.6.0_15,Apple Inc.
OS:           Mac OSX 10.6.1
Board:        MacBookPro3,1
Processor:    Intel Core 2 Duo 2.4Ghz 4mb L2
RAM:          4GB DDR2
GPU:          GeForce 8600M GT 256mb
disc:         FUJITSU 160GB (MHW2160BHPL)

just under a minute...I'm glad I don't have to develop using that piece of [beep].

Gareth Davis
+8  A: 

Comparing the performance of Java programs is very hard. I wrote a computation intensive program (a ray tracer) in Java and to my surprise it ran 30% faster on my MacBook Pro than on my desktop computer, while both have very similar Core 2 Duo processors. Then I changed some parameters and it was suddenly the other way around. And sometimes on the same machine the program with the same input would suddenly take 5%-10% more time to run...

Have a look at these excellent articles by concurrency guru Brian Goetz to get an idea of how tricky measuring Java performance can be:

(More articles on the same website).

Performance of a Java program highly depends on if you're using the server or the client VM, which version of which OS and which version of Java you're using. Your question is essentially about startup time. Startup time will generally be longer when using a server VM, but the Java program will be running faster on the server VM. Startup time is not a good measure for general performance.

Jesper
+1 for pointing out the pitfalls/limitations of such a test. But have a look at my "tests" where I tested with -server and without, with no significant difference in startup times, which is quite surprising.
fvu
Startup time for something as complex as Jboss is not the same as startup time for a jvm! There is a lot of java code executed to get jboss up and runnig, threads are created, factories are initialised, connections are brought up, classes are loaded etc. etc. its a pretty fair test.
James Anderson
+2  A: 
23:12:07,437 INFO  [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=
JBoss_5_1_0_GA date=200905221634)] Started in 29s:1ms

Java version: 1.6.0_16
OS:           Windows XP SP3
Board:        ASUS P35KR
Processor:    Intel C2Q Q8300 2.5Ghz
RAM:          2*2 GB PC2-6400
GPU:          NVIDIA GeForce 8600GTS
disc:         Seagate 300GB (ST3320620AS)

I also repeated the test a couple of times with -server mode disabled, but the difference in time is probably just noise (< 1s).

fvu
A: 
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: 
       SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 59s:578ms

java version: 1.6.0_01
OS:           Windows XP (32 Bit)
Board:        Toshiba Notebook Sattelite A210-19Z
Processor:    AMD Athlon 64 X2 TK-57, 1.9 GHz
RAM:          2 * 1GB DDR2 630 MHz
GPU:          ATI Radeon X1200
disc:         Hitachi HTS542520K9SA00
tangens
+1  A: 
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA 
              date=200905221634)] Started in 27s:47ms

java version: 1.6.0_16
OS:           Windows XP
Board:        M2N32-SLI DELUXE
Processor:    AMD Phenom II X4 940, 3 GHz
RAM:          2 * 2 GB DDR2 (800 MHz)
GPU:          Matrox Millennium G550 PCIe
disc:         WDC WD1500ADFD-00NLR1
tangens
+1  A: 
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build:
            SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 25s:573ms

java version: 1.6.0_16 64-Bit
OS:           Windows Vista Ultimate 64-Bit SP1
Board:        (Lenovo Thinkstation, don't know what motherboard)
Processor:    Intel(R) Core(TM)2 Quad CPU Q9450 @ 2.66GHz
RAM:          8GB 2*2 GB DDR3
GPU:          NVIDIA GeForce 285
disc:         Intel SSD X25-E 32GB (used for the tests)

java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)

Could not test with -client, Java forced the -server mode perhaps due to the 8GB RAM. I find it interesting that disk speed does not seem to have much influence (a SSD disk should be pretty fast esp. in random access)

+1 for Jetty :)

mhaller
+1  A: 
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: 
SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 26s:412ms
java version: 1.6.0_15 - 64-Bit Server VM (mixed mode)
OS:           Mac OSX 10.6.1
Board:        MacPro1,1
Processor:    2x Dual-Core Intel Xeon 2.66 GHz (Total of 4 Cores)
RAM:          4 GB
GPU:          NVIDIA GeForce 7300 GT
disc:         Seagates 500GB ST3500410AS
Guillaume Poirier
+1  A: 
[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build:
             SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 24s:945ms

java version: 1.6.0_17 
OS:           Windows 7 Home Premium (32 Bit) 
Board:        ASUS M4A78T-E 
Processor:    AMD Phenom II X3 720, 2.8 GHz 
RAM:          2*2 GB DDR3 (labeled 1333 MHz) 
GPU:          NVIDIA GeForce 9400 GT 
disc:         Intel Solid State Disk (SSDSA2SH032G1GC 2,5")
tangens
+1  A: 
Java Version: 1.6.0_17
OS:           Mac OSX 10.6.1
Board:        iMac 11,1
Processor:    Intel Core i7 2.8Ghz
RAM:          4GB DDR3
GPU:          ATI Radeon HD 4850
disc:         Seagate 1TB (ST31000528ASQ)

First run:

[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA
date=200905221053)] Started in 20s:236ms

And after 5:

[ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA
date=200905221053)] Started in 18s:934ms
James Raybould