> Wow - I didn't expect such a performance increase:
> our server app that already had a 80% performance
> part of database access increased by almost 30% just
> by switching the 1.5 JRE (with server HotSpot) with
> the new 1.6 JRE! This looks good! :-)
Wait - so you're saying that the 20% that are not database access now only take -10%?
Well, the app calculates 30% faster than with 1.5 (server HotSpot). The "80%" database part is just an estimation as I enclosed the methods that access the database with timestamps that make up to 80% of the whole performance. So, these 80% include the (JDBC) code to read/write from/to database, JDBC driver code and the final database time.
I checked today again, and the 30% increase stayed. :-) However another app just increase by 10% (which is already very good) because this other app had a lot more access to external ressources (JDBC, file system, SOAP).
I guess, for specific apps, the performance increase can be even higher depending on the componentes/ressources involved.
Martin,
Is there any chance you could share your benchmark with us? We're always interested in analyzing the performance characteristics of production code. And if we know what's going on within your app we're better equiped to either improve upon (or at least retain) the performance benefits you're seeing.
Regards
Dave (dice at east dot sun dot com)
I didn't test with Benchmarks but with real world production applications. And now I even noticed a 100% speed increase: I downloaded the 64 Bit Linux version for my 64 Bit Ubuntu 6.10. And my Fractal programm runs (compared to 1.5.0_08 for the same Linux system) ub to 100% faster!!! It starts with the basic Mandelbrot set with an 20% increase and ends up with a full 100% increase at my test location
-0.5622026215230372, 0.6428171490727752, 2.220446049250313E-15 with 300 Iterations!
Yes, it takes 10 instead of 20 seconds just by replacing JDK 1.5 width JDK 1.6! That's so awesome!!! :-)
Hello, I made other experience.
I do mathematics with java. It is running under Windows.
My main routine is just a simple for loop with a subtraction.
JDK 1.5 (or JDK 1.4) with -server and IBM Java 5 (JIT) have the same performance.
jdk 1.6 with -server needs 50% extra time.
jdk 1.6 (and jdk 1.5) without -server need 70 extra time.
The -server hotspot optimization was much better in jdk 1.4 or 1.5.
Why?
Well, did you try the JRE instead of the JDK? The SDK binaries are with debugging code. Just copy the server HotSpot directory to the JRE installation and try again.
Well, you might have made other experience, but you can't say that "The -server hotspot optimization was much better in jdk 1.4 or 1.5." because it is not true because _all_ our applications (and also 3rd party Java apps like Eclipse) run considerably faster with Java 1.6. And HotSpot server is still much better than client for number crunching apps.
> Well, did you try the JRE instead of the JDK? The SDK
> binaries are with debugging code.
Could you please document that assertion.
> Well, you might have made other experience, but you
> can't say that "The -server hotspot optimization was
> much better in jdk 1.4 or 1.5." because it is not
> true because _all_ our applications (and also 3rd
> party Java apps like Eclipse) run considerably faster
> with Java 1.6. And HotSpot server is still much
> better than client for number crunching apps.
Except of course that the user has a specific benchmark that specifically demonstrates that.
I checked the sources. They changed the behavior of Random, so different inputs were generated.
But JDK 1.5_8 -server still performs slightly better at my application then JDK 1.6 -server (about 5%).
JDK 1.6 performs like JDK 1.4_12.
Have you tried IBMs Java50 jre it is at most as fast as JDK 1.5_08.
My code runs faster in JDK 1.4 style.
Here were my results based on my Factoring Algorithm:
The execution times relative to JDK 1.5.0 _08 -server which was the fastest
JDK 1.4 _121,43
JDK 1.4_12 -server1,05
JDK 1.5.0 _08 1,48
JDK 1.5.0 _08 -server1,00
JDK 1.6.01,16
JDK 1.6.0-server1,05
IBM JAVA 5 -Xnojit~ 7
IBM JAVA 51,00
> > Well, did you try the JRE instead of the JDK? The
> SDK
> > binaries are with debugging code.
>
> Could you please document that assertion.
I have read that somewhere but can't find the resource now. You can easily check the binaries. Also check the sizes:
JRE/lib/rt.jar = 40 MB
JDK/jre/lib/rt.jar = 44 MB
And you can write test code that throws an exception: with the JRE you will get a stack trace without line numbers ("Unknown source") and with the JDK you will get line numbers.
> > > Well, did you try the JRE instead of the JDK?
> The
> > SDK
> > > binaries are with debugging code.
> >
> > Could you please document that assertion.
>
> I have read that somewhere but can't find the
> resource now. You can easily check the binaries. Also
> check the sizes:
>
> JRE/lib/rt.jar = 40 MB
> JDK/jre/lib/rt.jar = 44 MB
>
> And you can write test code that throws an exception:
> with the JRE you will get a stack trace without line
> numbers ("Unknown source") and with the JDK you will
> get line numbers.
You do realize that the JDK comes with the JRE right?
So you don't copy files - you just use the correct directory.
> No, I _mean_ the JRE that comes with the JDK! The
> _JRE_ with the SDK has debug symbols. You need to
> download the separate JRE to have an optimzed
> compilation.
So presumably you do understand that there are two java.exe files, two rt.jar files, etc that come with the JDK.
And so how do you explain the differences in the file sizes between the two different rt.jar files that come with the JDK?
Oh yes, sorry! Now I understand. You install the JDK with the JRE together in one step. I meant the JRE in the JDK when you _don't install the JRE_ during the installation process of the JDK. If you don't install the JRE, the JDK still has an additonal JRE - with debug symbols.
We install JDK and separate JRE always separately as the JDK installation wizard doesn't allow to set a custom directory for the JRE - it installs the JRE at a default %PROGRAm_FILES%/Java directory that we don't want/allow. Therefore, I didn't thought of the extra JRE installation.
> Oh yes, sorry! Now I understand. You install the JDK
> with the JRE together in one step. I meant the JRE in
> the JDK when you _don't install the JRE_ during the
> installation process of the JDK. If you don't install
> the JRE, the JDK still has an additonal JRE - with
> debug symbols.
As per your suggestion the JRE files have to come from some source.
And if the JRE is installed, regardless of how it was installed, why would you not use that rather than copying files?