Slashdot Mirror


Java Performance On Ubuntu Vs. Windows Vista

Henckle writes "Phoronix did a comparison of the Java performance between Ubuntu and Windows Vista. They tested both Java and OpenJDK on Ubuntu 8.10 and Java on Windows Vista Premium SP1, all with stock configurations. To no-one's surprise, Ubuntu was faster in a majority of the tests. The two OSs were similar in ray-tracing, and Vista was faster at Java OpenGL due to shortcomings with the Linux graphics driver."

37 of 258 comments (clear)

  1. I must say... by Thelasko · · Score: 4, Funny

    that new 64-bit Java plugin for Linux is smokin! No waiting for applets to load or anything.

    --
    One of our competitors trademarked the term "hypothesis". From now on, we will call them "boneheaded ideas".
  2. Interesting, but lacking some crucial details... by Smidge207 · · Score: 4, Insightful

    Just out of professional curiosity: what was the partition layout on the laptop? As benchmarks in some articles have shown, the early part of a drive is faster than later part (sequential transfer rate). With a constant areal density, data flies under the read/write heads faster on the outer larger-radius tracks.

    This is a something that's hard to get right when benching win vs. lin on the same HW, since usually you have a fairly normal dual-boot install, and one has the advantage of the outer tracks.

    It's probably not a big deal if you have two adjacent 10 or 15GB partitions, with a big data partition somewhere else.

    Ideally you'd re-partition and run benchmarks with each system installed to the first few GB. To get reasonable numbers for I/O dependent tests, you could make a scratch partition that you reformat to ext3 or ntfs before running the tests. Then have I/O benchmarks do their work in that scratch partition). (or XFS, see my previous posts for XFS tuning . XFS's delayed allocation means it doesn't start writing until you runs low on RAM, or it otherwise decides it's time to start. This means uninterrupted reading for longer = less seeks = faster.) This tests fresh filesystems, not somewhat worn filesystems that everyone will actually have after even a day of use, but usually it's not a big difference because most filesystems don't suck that badly when they're not close to full.

    I thought Vista SP1 was supposed to fix slow file I/O. Oh, IIRC, that was just slow file copying when you do it via the GUI shell. So never mind, I guess either your partitioning really skewed things in favour of GNU/Linux, Vista sucks at the file-encryption workload, or it was CPU-limited and the older JVM on Vista loses on that code.

    Oh, well, sorry for the rambling, just my $1.00-.98....

    =Smidge=

    --
    Is it just my observation, or is eldavojohn an idiot?
  3. that's odd by z-j-y · · Score: 4, Insightful

    those tests (CPU burners) should perform the same on Linux or Windows, I don't see why JVM would behave differently.

    1. Re:that's odd by Shados · · Score: 4, Informative

      They -are- different JVM builds, so its possible (as is common in the JVM's history) that some bug fixes improve performance wildly... Not across the board though, so something's wrong, either with the JVM, or with Windows itself... but something is seriously messed up.

    2. Re:that's odd by Dr.Merkwurdigeliebe · · Score: 3, Interesting

      If MS put it in a VM, then it's an MS issue ...

      --
      I'm a student. I write iPhone apps.
    3. Re:that's odd by enharmonix · · Score: 2, Informative

      Protected Mode leverage's Windows Vista's UAC

      You're right that its not running in a VM like VMware, but we're talking about the same thing. IE7's protected mode is just a UAC Virtualization applied to IE7. For more info on virtualized processes: http://www.windowsecurity.com/articles/Protecting-System-Files-UAC-Virtualization-Part1.html but it sounds like you are already familiar with it.

      BTW, the link is for anybody else reading, it's apparent you are familiar w/ how UAC works. Cheers.

  4. always trust phronix to mess a benchmark up by MancunianMaskMan · · Score: 5, Insightful

    they used java 1.6.0_10 on linux and 1.6.0_07 on windows. Hate to give the benefit of the doubt to ballmer & co but in spite of the minor version number, a lot of work in performance has been done on Java recently. The result is pretty meaningless.

    1. Re:always trust phronix to mess a benchmark up by hansamurai · · Score: 4, Informative

      Excellent point, u10 was the next "major" minor release after u07, check out the release notes for it here, they're... long.

      http://java.sun.com/javase/6/webnotes/6u10.html

    2. Re:always trust phronix to mess a benchmark up by jfim · · Score: 2, Informative

      they used java 1.6.0_10 on linux and 1.6.0_07 on windows. Hate to give the benefit of the doubt to ballmer & co but in spite of the minor version number, a lot of work in performance has been done on Java recently. The result is pretty meaningless.

      Indeed, this is a fairly lame benchmark. Java 6 update 10 is when they switched to the "consumer JRE" (also known as update "N"), which included a lot of changes to lower the footprint of the JRE, improve startup time, etc.

  5. Ray tracing in Java by olddotter · · Score: 3, Interesting

    Have computers or JIT compilers gotten fast enough that people actually do ray tracing in Java?

    1. Re:Ray tracing in Java by Yetihehe · · Score: 5, Interesting

      Yes. Sunflow is one example. I did my own tests, java vs c++ (almoste the same code) and java was only about 1.3 times slower.

      --
      Extreme Programming - Redundant Array of Inexpensive Developers
    2. Re:Ray tracing in Java by shutdown+-p+now · · Score: 3, Interesting

      Compared to plain C/C++ code (no non-standard compiler intrinsics etc), Java has been fast enough for a long time now. Think about it: it's all just math, and JIT (which may itself be slow - it doesn't matter!) generates pretty much the same native code as a C compiler would. g++ can still do some trickier optimizations, which may account for the odd 5-10% of difference; but hardly more than that. .NET can actually fare even better, because it supports raw unsafe code and data pointers with arithmetic, dynamic allocation of stack memory (alloca), and unions - this essentially covers all optimization tricks available in ANSI C.

  6. Fairness by abigsmurf · · Score: 4, Insightful
    I love the way in every test test Vista loses it's "Ubuntu is faster" but in the test where Vista wins, they explain and excuse it going "bad opengl drivers".

    Either give possible reasons for slow performance of one OS each time or don't do it at all. To excuse bad performances in a benchmark in such a selective manner reeks of bias. Who's to say the Vista performance gap wasn't caused by bad drivers? Indeed the a lot of the tests where it was slower are ones involving disk access and Vista is known for being slow at this sort of thing.

    1. Re:Fairness by Dr.Merkwurdigeliebe · · Score: 2, Insightful

      When "Vista is known for being slow at this sort of thing", that's a cause of the OS itself, which is different than something that the OS relies on. You can't say that Vista lost at some benchmark because it's a shitty OS, therefore, it's not fair to call it a shitty OS.

      --
      I'm a student. I write iPhone apps.
    2. Re:Fairness by Chirs · · Score: 2, Insightful

      Likely they mention the issue being the graphics drivers in linux because graphics drivers are a continuing sore spot.

      As for disk access, in my experience the vast majority of disk access speed issues are not driver related, but are due to the I/O subsystem, elevator algorithms, and filesystem code in the OS.

    3. Re:Fairness by Vellmont · · Score: 5, Insightful


      I love the way in every test test Vista loses it's "Ubuntu is faster" but in the test where Vista wins, they explain and excuse it going "bad opengl drivers".

      Maybe that's because Ubuntu is an open source application where we actually know why the test gave bad performance, and actually know that it's going to improve in the future?

      Who's to say the Vista performance gap wasn't caused by bad drivers?

      Don't dismiss the advantages of an open system where you can actually understand what's under the hood as just "test bias".

      --
      AccountKiller
    4. Re:Fairness by abigsmurf · · Score: 3, Insightful

      Sorry, that's just a stupid argument. Because an application is closed source they're never going to boost performance? Because you can't see the source code, you don't know if it's drivers causing bad performance?

      You can see through benchmarking and general usage where an application is falling down in performance terms, is doesn't matter if you've access to course code or not. You say Vista will never have it's performance boosted? Have you seen the comparisons between a clean install and the latest updated version?

      One of the most obvious examples of clear bad drivers in OS' are graphics drivers, regardless of if it's Vista or Linux, closed drivers or open drivers, it's usually plainly obvious if drivers are resulting in bad performances.

      Besides which, benchmarks are for the here and now. OpenGL drivers may improve for Linux, Vista may improve its file handling, JavaVMs may see better optimisation, heck, even the damn benchmarks will probably get updated. None of this has anything to do with open or closed source.

    5. Re:Fairness by jellomizer · · Score: 2, Interesting

      By your argument Linux in theory should be light-years faster then Windows Mac OS or any other OS. However there are things that are slow in Linux. Why is Open GL so slow. Couln't you make MesaGL faster and more compatible with OpenGL.

      You may be at the mercy of Microsoft yes Microsoft may not care about Java vs. its own .NET platform. However if Microsoft could whip Linux in Java Performance they would love it. Fine Vista loss these benchmark but the excusing the one area it did win was in very poor taste.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
  7. Re:That's my laptop! by Anonymous Coward · · Score: 4, Insightful

    You're having a hard time picking between Linux or Windows? Go Linux, it's cheaper to change your mind.

  8. 3D in Java? by SilentChris · · Score: 3, Insightful

    The two OSs were similar in ray-tracing, and Vista was faster at Java OpenGL due to shortcomings with the Linux graphics driver.

    I know this will be seen as a troll, but who the hell uses Java for ray-tracing or with OpenGL?

    1. Re:3D in Java? by Nicopa · · Score: 5, Informative

      I think you should check the Java port of Quake then: http://bytonic.de/html/jake2.html

  9. Not completely fair by Yahma · · Score: 3, Insightful
    While interesting, the results pose more questions than they answer. I can see several problems with the benchmark:
    • Slightly different Java versions used in the tests.
    • The tests should have all been forced to use either Client or Server mode.

    Its possible that the Windows Java defaults to client, while the Server mode was used in Linux. That could account for the major speed improvements seen in the Linux versions. I would like to see the Server mode forced on all the JVM's and the tests re-run.

  10. Not surprising by greg_barton · · Score: 3, Interesting

    I've been using scimark for years to evaluate system performance with java.

    Try it yourself.

    Linux has outperformed windows (on average) for years, and OSX as well until recently. (java 1.4 performance on OSX was dismal)

  11. I was surprised by spottedkangaroo · · Score: 5, Insightful

    To no-one's surprise, Ubuntu was faster

    I'm surprised.

    I'd expect Java to go faster in windows. I don't think the reasons for using Linux are speed and software availability. I'd expect much more attention is paid to the windows versions.

    --
    Imagine if you weren't allowed to use roads because a bus company complained about your driving 3 times. --skunkpussy
    1. Re:I was surprised by LWATCDR · · Score: 4, Interesting

      You shouldn't be.
      Most java development these days takes place on the server side. Linux is has a large precentage of the server market. Then you must know that Sun is a Unix company. They push Solaris and java on Solaris. Solaris is a lot more like Linux than Windows. The the final piece is that in the Windows server market Java shares space with .net.
      So as far as the amount of attention I would say that Solaris/Linux/Unix gets just as much attention as Windows does.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    2. Re:I was surprised by Fujisawa+Sensei · · Score: 2, Insightful

      But Microsoft spends a huge amount of effort making sure that Java is a slow as possible on Windows machines.

      Take Hero Designer, takes a few moments to start on both machines. But leave it running, and then go out to lunch. On Linux its there waiting for you, on windows you're better off rebooting, than you are trying to switch back to it.

      --
      If someone is passing you on the right, you are an asshole for driving in the wrong lane.
  12. Java on desktop has been irrelevant for a while by BigGerman · · Score: 2, Interesting

    Now, if they tested webapps performance, say on Tomcat on both OSes, the results would be quite different. I would guess Vista would be faster for a single thread test but would not scale at all.

  13. Re:Interesting, but lacking some crucial details.. by xouumalperxe · · Score: 4, Insightful

    Indeed, you're rambling. Partitioning schemes are not very relevant for this test suite. The only test that could realistically be considered HDD-bound is the file encryption one, and even then the performance difference is too large to be attributed to which bit of the disk you're reading. I'd guess that on-the-fly encryption is must more CPU-bound than it is HDD-bound, and under that light that test proves consistent with all the other raw maths performance tests.

    If anything, what I'd like to see is the 3D rendering bit redone with an nVidea card (that actually has decent drivers), to actually test their assertion that the performance loss on the linux side is really due to the graphics drivers.

  14. Re:Interesting, but lacking some crucial details.. by chrb · · Score: 5, Insightful

    Various problems with the Phoronix test methodology have been noted before and before that. Without going over the same stuff, here are some potential questions about this benchmarking:

    • Where is the statistical analysis of these results - ok, you ran a test once and it was 30% slower. Is this reproducible? What is the variance? Is there any statistical difference between openjdk/sun java?
    • Why is the Java minor version different? Do you see the same results if the same minor version is used?
    • As mentioned in the previous discussions, exactly why is Windows slower on the file encryption task - it should be either limited by disk throughput, or by CPU throughput, so observing a 40% drop in performance attributed to the underlying I/O handling of the operating system is somewhat surprising; are you sure the test methodology is sound here, and if so, how do you explain the results?
    • Are these results applicable to both 32 and 64 bit distributions and JDKs?
    • How do you know that the 2D benchmark performance on Linux is attributable to poor graphics drivers? Why not run the test on another PC and then swap out graphics cards (hence eliminating all other factors) and report on the results?

    There are a lot of questions that this benchmarking should have answered, and a lot of assumptions made that could potentially be invalid.

  15. Re:That's my laptop! by Count+Fenring · · Score: 3, Insightful

    Not, strictly speaking, true...

    The NTFS-3g driver for Fuse works very well, at this point, and there are ext2/3 drivers for Windows if you look for them (Albeit the free one that I know about doesn't handle journaling in Ext3).

    Here you go!

    My personal favorite setup is having an ext3 home directory in Linux, and using the My Documents folder in NTFS as a media directory.

    Slight annoyance of having two desktops, but other than that, pretty ideal.

  16. Re:Interesting, but lacking some crucial details.. by chrb · · Score: 4, Informative

    even then the performance difference is too large to be attributed to which bit of the disk you're reading

    No it isn't. How do you know that a particular sector of the hard disk isn't failing, causing access to that one sector to be a thousand times slower than other sectors? This is why experiments are supposed to be run many times, across different platforms, and the aggregate results taken. Without multiple experimental replicates you have no way of showing that the results you observe generalise at all; the observed problem could just be one bad run.

  17. Stock configurations by DrYak · · Score: 2, Informative

    One also has to wonder how well they "tuned" the Vista install.

    Everything left to default, including desktop effects according to TFA.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  18. Re:A couple of test vs. scientific benchmark by Tawnos · · Score: 2, Informative

    When was the last time you tried running Windows 64 bit? My experience is that both Vista 64 and Win7 64 both have great driver support now (never tried XP64, but the XPDM (XP driver model) is deprecated, so I understand why finding hardware for the platform is hard). In fact, the issues at Vista launch were largely due to moving to the new driver model, and hardware vendors not being up to speed. Two years later, those issues are no longer a problem.

    Or was your comment sufficiently advanced satire that I'm missing? :)

  19. Re:Interesting, but lacking some crucial details.. by godefroi · · Score: 3, Informative

    That's gotta be the stupidest comment I've ever read. Congratulations.

    Programming languages are not IO bound. Operating systems aren't IO bound. TASKS are IO bound. ALGORITHMS are IO bound.

    --
    Karma: Poor (Mostly affected by lame karma-joke sigs)
  20. Re:Interesting, but lacking some crucial details.. by ozphx · · Score: 4, Informative

    Yeah its pretty much assclowing IMO. I just booted my Vista laptop this morning. Process explorer shows 9300B idle cycles vs around 200B for other shit (mostly Opera, Steam, and sony's shitty phone sync). Taking them out we're left with bugger all - around 10B cycles "wasted" by default Vista services etc (well, actually SetPoint, AVG, Daemon tools, but regardless). Most of these aren't actually doing anything, just sitting there having started and are now idle. Looks like close as makes no odds 100% CPU avaliable for their JVM.

    So according to this, the OS has fuck all overhead in terms of services. So either the kernel is managing the 50% overhead we saw in the SciMark test - or their tests / JVM are crap.

    I'd tend towards thinking the latter.

    --
    3laws: No freebies, no backsies, GTFO.
  21. Re:Interesting, but lacking some crucial details.. by ozphx · · Score: 2, Informative

    See my previous comment. My Vista install still has everything turned on - and realistically it makes zero difference.

    I'd suggest either the JVM sucks, or their tests sucked.

    --
    3laws: No freebies, no backsies, GTFO.
  22. Re:Interesting, but lacking some crucial details.. by techprophet · · Score: 2, Insightful

    That is part of the point. Java on both platforms is very similar (though not exactly the same), so the test is more of 'Which OS is faster?' than 'Which Java is faster?'