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."

19 of 258 comments (clear)

  1. 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?
  2. 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.

  3. 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.

  4. Re:That's my laptop! by neuromanc3r · · Score: 1, Insightful

    Ironically, I can't decide if I want Ubuntu or Vista Home Premium on it.

    It's not like the two are mutually exclusive...

  5. 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.

  6. 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.

  7. 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?

  8. 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.

  9. 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 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.
  10. Re:fast java by Anonymous Coward · · Score: 1, Insightful

    Clearly, this is a troll; I cannot help but reply to it.

    When was the last time you actually wrote any software in Java? Describing the Java of today based on your memories of the old Java is like comparing Linux today to Linux of the late 90's. There have been several architectural changes both behind the scenes and in front of them for both.

  11. 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.

  12. 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.

  13. 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.

  14. 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?'