Jump to content
The Inquirer-Home

Linux runs Java faster than Windows

According to benchmark tests
Friday, 19 December 2008, 13:06

IF YOU WERE WONDERING which operating system runs Java most efficiently, then perhaps you're in for a shock. Running Java benchmark tests on both Windows Vista and Ubuntu Linux has shown that yet again, Vista came last.

The comparison tests were executed on a Dell Inspiron 1525 notebook with an Intel Core 2 Duo T5800 processor, 3GB of DDR2 memory, a 250GB Hitachi HTS543225L9A300 HDD, integrated Intel 965 graphics, and a screen resolution of 1280 x 800.

The face-off was between Windows Vista Home Premium SP1 and Ubuntu 8.10. Vista used Java 1.6.0_07, while Ubuntu Linux used Java 1.6.0_10. Both Java versions were the stock releases for each operating system at the time of testing.

The Java benchmark tests included Sunflow Rendering System, Bork File Encrypter, Java SciMark, and Java 2D Microbenchmark. All tests ran the same compiled Java byte-code on both Ubuntu Linux and Windows Vista.

The first test up was with the Sunflow Rendering System. Although that heavily stresses the CPU, both operating systems performed equally.

Next up was the Fast Fourier Transform (FFT) test, where the fastest performance was seen using Sun's Java stack on Ubuntu 8.10. There Ubuntu significantly outperformed Vista, as it was about 30 per cent faster.

The Successive Over Relaxation (SOR) test with Java SciMark also ran fastest on Ubuntu, as the test ran about 33 per cent faster under Linux than it did under Vista.

On the Monte Carlo test with Java SciMark, Vista was again blown out of the water, as the JVM was a whopping three times faster on Ubuntu.

The SciMark composite performance test showed Ubuntu turning in the best performance yet again, as it came up as the top performer there too at 50 per cent faster compared to Vista.

Vista did come out on top in one test. Its j2dbench performance was a lot better, yet this was most likely due to the Intel graphics stack lacking performance optimisations in Linux.

So there you have it. Although these tests didn't cover every aspect of Java, we think these benchmarks show that Vista is significantly outperformed by Linux when it comes to running Java. µ

Share this:

Comments
BIG DEAL

who cares.....

you guys should find something interesting to write about. Content has been exceptionally boring for the past few months.

posted by : wingnut, 19 December 2008 Complain about this comment
Worse that the gadget show

for crappy arbitrary testing methods...

Sorry, but they used different versions of java between the tests, making any conclusions about the host operating systems performance when running the tests totally void.

Jesus, it's not rocket science surely...

posted by : Mark, 19 December 2008 Complain about this comment
Mr

It's pretty pointless in general to compare Java performance on different platforms using different Java releases. You can't really say much about platform difference since there is a large difference between 07 and 10.
On top of that SPECjvm tests doesen't spend that much time in OS code anyway. Certainly not enough to motivate 30-300% performance difference. This is most likely the fault of SUN's engineers failing to generate equally optimized code on the differnt platforms. Not the platforms themselves.
I say these runs are pretty pointless as far as proving differences between Linux and Windows.

posted by : Erik Junberger, 19 December 2008 Complain about this comment
why would you do that?

Is there any reasons whatsoever why you would use different versions of the JRE? Isn't it a matter of minutes to actually install the proper JRE on Vista (Java 1.6.0_10) so that the test is relevant. And if you're going to test, why do it with Java 1.6.0_10 and not Java 1.6.0_11 anyway?

posted by : Eugen, 19 December 2008 Complain about this comment
What about OS X

I would have liked to see how OS X faired.

posted by : Regulas, 19 December 2008 Complain about this comment
Meaningless Tests

First of all lets look at the tests themselves. FFT and SOR... You have to be a moron to use mathematical algorithms in Java and care about performance at the same time. Now I would definitely expect poorer performance of Java under Windows. It is clear that Sun hates MS, so why do you expect them to bother fully optimizing the package. Even with an optimized package I would expect slower performance on Windows due to higher overhead in the OS. Now using different version of Java is just plain wrong and you know it, further degrading the quality of the piece. It is clear that this piece is just another attempt to needlessly bash an imperfect OS. I just wish MS wasn't forced to stop writing their JVM as it worked so much better than Sun's at the time. Although I admit the Sun JVM has come a long way since then. Since it was clear that it turned into a Vista bashing article, why didn't you compare it to XP and OSX as well. I'm sure those two would have outperformed Vista as well.

posted by : Josh, 19 December 2008 Complain about this comment
I'm no rocket scientist, but...

... this links to the (official) differences from 1.6.0_07 and 1.6.0_10: http://java.sun.com/javase/6/webnotes/6u10.html.

Let's forget that 6.0_11 has been out for a while (so it's LAZY testers we're talking about): there's a lot of stuff that has changed....

Besides, my ZX-Spectrum would embarass OS-X, Vista, XP and any UNIX flavour you like at the same test.... just lemme find the correct JRE to use...

posted by : zio, 19 December 2008 Complain about this comment
I looked it up for them

I went to the web site the Inquirer linked and they have a OS X vs Linux comparison.
http://www.phoronix.com/scan.php?page=article&item=ubuntu_macosx&num=1
I quote at the end from their testing, "With this being our first time comparing the performance of Mac OS X to Ubuntu Linux, we were not sure going into this which one would emerge as the leader. After looking at these results from the Phoronix Test Suite, it's almost a toss-up as to which operating system is faster."
Did Nick Farrel write this and leave out OS X on purpose because OS X did well. Wait till Snow Leopard releases.

posted by : regulas, 19 December 2008 Complain about this comment
meaningless comparison

meaningless comparison, for reasons as explained above numerous times.

posted by : ssj4Gogeta, 19 December 2008 Complain about this comment
Duh

Inq in fruitless apples != oranges, shocker.

posted by : Zer0th, 19 December 2008 Complain about this comment
most-commented articles...

This article got a lot of comments, so it must be a popular subject. Not as many as Charlie often gets, but still a respectable amouont. I hope to see more in the future. :)

Maybe the inq could use a 'rating system' for the articles, rather than comments.

PS don't feel bad if I love Charlie more. I still love you too!

posted by : mike, 19 December 2008 Complain about this comment
Hey - Remember the MS JVM?

... and how it was faster than ANY JVM sun could put out? Where is it now? Oh, well Sun was embarrased, so they sued MS to stop allowing it to exist.

Moral of the story: Sun hates MS because they are envious of their engineering prowess.

posted by : Max Weber, 19 December 2008 Complain about this comment
in yer luvly-jubly Sun!

I'm no expert on the Java coding environment, but didn't Sun create Java for their own OSs and machines to begin with - and since Solaris is unix-based (and Suns own CPUs RISC based - so I'd gather it runs all the better on an actual Sun machine), then ur yeahr of course a linux OS is more likely to run it better.

posted by : optimise optimize , 19 December 2008 Complain about this comment
LOL

This was a comparison of Java versions on the stock settings of Vista SP1 and Ubuntu 8.10. That's why different JVM versions were used. And how does this bash Vista? These are just the results.

"Sun hates MS because they are envious of their engineering prowess. "
Nicely *fabricated* (whether it is true or not).

posted by : Xanikseo, 19 December 2008 Complain about this comment
unfair? not

so you guys are crying becuase phoronix used stock vms. Oh buhuu. You could also argue that the test is not fair, because Ubuntu is freaking slow.
All this shows is two things:
vista sucks as a java environment.
MS fanboys are even greater crybabies than ubunturds.

oh, and Max Weber?
Shut up, you know nothing. Sun did not sue MS becuase the jvm was faster - but because MS tried to destroy java with incompatible changes in their jvm that violated licence and trademark agreements. It was MS own choice to scrap it afterwards. If MS had played nicely, you still could have a fast jvm. Maybe.

Because java got faster on all platforms anyway - so the old MS jvm, updated to 6 would probably suck as every other MS product that had some years to add bloat and slowness.

posted by : nrgman, 19 December 2008 Complain about this comment
What's the fuss?

I really don understand why so many ppl fuss abt the minor version differences. Be sensible. The author already mention STOCK SETTINGS, it means this the version tested by each OS creator at release, and this what end user will get after installation. I think any body disagree with the results and suspect the performance differences are due the minor revision of binaries, pls test with their 'fair configuration' and post here with their findings bfr start flaming. On whether the comparison is meaningful or not is quite subjective. It seems that most who disagree have started raging here but that doesn't mean majority are finding it meaningless.

Personally, I think it's not baseless to say Java run faster in Linux then Vista, at least Linux kernel are open source which offer Java creators more room to experiment & optimize, compared to Microsoft. Looking at the diff of performance as wide as 30%, you really need facts to convince ppl that the performance lag in Vista is due to impact of minor version differences in JRE, and not by arguing on whether the benchmark making any sense.

posted by : Peter, 19 December 2008 Complain about this comment
JVM

It's obvious people do not understand one of the biggest strengths of Java and that is "portability". Minor code builds _07 vs _10 refer to JDK mostly if not completely. Not the JVM. Java code compiled on Vista runs on Ubuntu. What makes the difference performance wise is the JVM. JVM packaged with Java 6 JDK in those two versions are likely the same functionality and capability wise.

So the article makes perfect sense. Not that it's something we didn't know before. It just has a nice touch in the way it reflects JVM performance on two different platforms... math, 2d...etc. It's all about how JVM performs. Believe me, it's something you always think about... and usually comes after second to stability.

The article reflects a simple question: What platform should I choose as my java platform..... production, dev, test...

For those with doubts, Sun's own OS used to have a whack of problems with threading as opposed to NT. Sorted out in the meantime... but used to be quite important.

MS JVM? Oh boy, some people really don't understand Java and why it's so strong.

posted by : Zii, 19 December 2008 Complain about this comment
yeah...

Beyond the java version differences there's just so much detail lacking that it's really hard to trust these results much. But it's entirely possible java runs better on linux. But then as everybody else has said, it probably runs better on xp as well.

posted by : Andrew, 20 December 2008 Complain about this comment
openjdk

they even trew openjdk into the mix on the ubuntu side - and openjdk on ubuntu was faster than sun jvm on vista ... that should tell you a lot.

posted by : nrgman, 20 December 2008 Complain about this comment
Doesn't Matter

Doesn't matter if everything on Windows has poorer performance, most people will use it anyway!

posted by : Allen, 20 December 2008 Complain about this comment
Are they for real?

Firstly, that site is clearly biased towards Ubuntu, its a pro-Linux site! Pro-Linux usually means anti Microsoft (Windows etc), so the article uses a set up that favours the Linux based system.

The same version of Java is available for all OS's. The specific Ubuntu version comes under OpenJDK as they mentioned. The simple fact that they claim Vista was only up to 7 and Ubuntu up to 10, considering they were talking about the latest stock version and the article is dated 18 Dec 2008, shows they had no idea what they were doing - actually they do, they just set it up so Vista looks bad in the comparison.

They also did not mention whether they were using the x86 or x64 versions of Vista or Ubuntu. Since its clearly a pro linux site, they'd probably favour x86 Vista and x64 Linux/Ubuntu.

In other words, the article is essentially a con. The fact they set it up as they did, its very likely running Java update 11 on both systems would equal a very similar result (Vista may have actually taken the lead). I'm not saying Vista is perfect, but all this false comparisons put out by Mac and Linux fans kinda suggests that it is much better than it is given credit for.

posted by : Mick, 20 December 2008 Complain about this comment
where did you find

a machine still running vista?
All been cleared out round here so I cant even try to see if will run _10!

posted by : Tom, 20 December 2008 Complain about this comment
Invalid test

As much as I dislike Vista (I've been a Mac user ever since Vista cratered onto the scene) this test is invalid and unfair. In order to fairly test the effect one aspect of a system has, that has to be the ONLY aspect of the system that changes between tests.

For the test to be completely fair, both machines at the bare minimum must be running the same version of the JVM. The Ubuntu box had a newer version, there's a good chance said newer version had optimisations the older versions didn't.

Even then you couldn't be 100% sure the test is completely fair, as each version was probably compiled differently. For best results you'd build the JVM for both platforms using an identical compiler with identical settings. GCC should do nicely for this.

With Vista having more than enough wrong with it to bash it fairly there's really no need to make it compete on an uneven playing field to get more stuff to bash it on. Run the tests again under proper controlled conditions.

posted by : Gordon, 20 December 2008 Complain about this comment
JVM

It's ridiculous to suggest that both JVM should be compiled the same way with the same compiler. People people, still don't understand. We're talking two different end platforms. You compile JVM for both with all the proper optimizations for the specific platform. You try to get as much as you can from JVM and that end platform with all the god given optimizations written specifically for the platform. Tests will lose all sense if this wasn't the case. What's wrong with you? Do you disable 33% of Core2Duo cache when comparing it to Opteron just so they "match". Do you match the n-way associativity of the cache just for the sake of a "just" test? NOOOO!
br br
JVM must be optimized for the end platform as much as possible. Then you test the JDK behaviour on them. Run the tests and see what you get. That's the only test that is useful to anyone deciding on the platform. Sheesh.
br br
Again, the differences in the result come mostly from how good the JVM is on the given platform. How well does it work with the OS and the machine. Even if the rest of the JDK was somehow dramatically different on different platforms - it should be - written for the platform. But that's unlikely. As if all the interfaces were native in JDK. Lol.

posted by : Zii, 21 December 2008 Complain about this comment
Memory

The Windows platform clearly is very immportant to Sun because of market share. (Windows market share is declining, but giving way to Mac OS, not Linux.) In fact they have gone to great lengths in order to make use of Vistas new capabilities. Java 6 update 10 introduced a quick starter for Windows. JavaFX isn't even released for Linux or Solaris yet. Java does run great on Linux, though. It also makes better use of your physical memory. With Windows you can only use about 1GB of memory no matter what you put in there. That's because MS creates memory holes loading dynamic libraries (DLLs) and fragments the virtual address space. With Linux you can use all of your memory. And if that's not enough, you can always switch to 64bit, which is a much more realistic option with Linux: All apps are available as 64bit. Microsoft should really work with Sun in order to catch up.

posted by : Joe Blow, 21 December 2008 Complain about this comment
Apples vs. cars

It's not even apples vs. oranges comparison. Ubuntu ran server version of HotSpot VM and Windows ran client version of HotSpot. Main difference is that server hotspot has higher startup time and higher memory usage for approximately 10% - 30% faster execution overall. So the test they did actually shows difference between two different ways of executing Java bytecode and not speed differences between Windows and Linux Java. If anything then the speed is about the same (within statistical error) for server variant of VM.

posted by : TT, 21 December 2008 Complain about this comment
rubbish

Anybody who knew what they were doing would immediately throw out results where a mathematical benchmark is 3 times faster. The O.S. simply can't have that much of an effect.

Also, JVM settings, particularly server vs. client need to be exactly the same. To not explicitly set the HotSpot options the same on both platforms is pretty ignorant.

posted by : nb froggie, 24 December 2008 Complain about this comment
Liers!

I happened to compared mathematical calculations in java on the same version of JVM on linux and windows. Linux lags 10-20% on the same hardware using same JDK 6. Not sure how you guys got those results.

Should also say Open JDK is about 5-10% faster than SUN JDK.

Currently testing Sun Solaris for x86

Linux used - Ubuntu server 9.04 64 bit, server and client JVM. Windows - XP and Vista 32 and 64 bit, server and client.

posted by : Alex Kapchysnky, 07 May 2009 Complain about this comment
Linux is already faster...

Linux is alrdy faster then windows.. on OpenGL, linux is about 2000% faster then win7

posted by : fpsasm, 14 December 2009 Complain about this comment
Of course you would care

Well I'll take a live scenario that happens to me on a daily basis, we have made our development environment agnostic to OS so basically developers have the freedom to chose between any OS they want (of course we favor all flavors of Linux)
now surprising enough a developer who would like to run a full maven build on one specific huge project finishes up with 22 minutes on Windows if not more and less than 4 minutes on Linux. is a reduced factor of 5 convincing enough? I guess for us it made a difference and for those who don't too bad, they probably hibernate instead of doing actual work.

posted by : Fady Matar, 23 December 2009 Complain about this comment
Advertisement
Subscribe to the INQ Newsletter
Sign-up for the INQBot weekly newsletter
Click here to sign up Existing user
Advertisement
INQ Poll

Nvidia Fermi

Will graphics cards built with Nvidia's Fermi GPUs be a hit?