Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Java Performance On Ubuntu Vs. Windows Vista

Posted by kdawson on Fri Dec 19, 2008 10:49 AM
from the steaming-cuppa dept.
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."
+ -
story

Related Stories

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by Thelasko (1196535) on Friday December 19 2008, @10:52AM (#26173267) Journal
    that new 64-bit Java plugin for Linux is smokin! No waiting for applets to load or anything.
  • by Smidge207 (1278042) on Friday December 19 2008, @10:53AM (#26173279) Journal

    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=

    • by xouumalperxe (815707) on Friday December 19 2008, @11:34AM (#26173763)

      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.

      • by chrb (1083577) on Friday December 19 2008, @11:46AM (#26173913)

        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.

        • by ozphx (1061292) on Friday December 19 2008, @09:57PM (#26180847) Homepage

          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.

    • by chrb (1083577) on Friday December 19 2008, @11:35AM (#26173779)

      Various problems with the Phoronix test methodology have been noted before [slashdot.org] and before that [slashdot.org]. 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.

        • Re: (Score:3, Informative)

          by Tawnos (1030370)

          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

      • Stock configurations (Score:3, Informative)

        by DrYak (748999)

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

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

      • Re: (Score:3, Informative)

        by ozphx (1061292)

        See my previous comment [slashdot.org]. 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.

      • Re: (Score:3, Informative)

        by godefroi (52421)

        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.

  • that's odd (Score:4, Insightful)

    by z-j-y (1056250) on Friday December 19 2008, @10:56AM (#26173301)

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

    • Re:that's odd (Score:5, Informative)

      by Shados (741919) on Friday December 19 2008, @10:58AM (#26173321)

      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.

    • by MancunianMaskMan (701642) on Friday December 19 2008, @11:02AM (#26173367)
      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.
      • 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 [sun.com]

      • Indeed, the u10 version of JDK6 is probably the biggest "point" release Java's ever had. For some strange reason Sun has decided not to use the last decimal point of their version numbers, but really this was JDK 1.6.1.

        Any comparison of pre-u10 benchmarks with u10-or-later are pretty much completely invalid. This is especially true on Windows, which now uses hardware accelerated pipelines all over the place, so will probably be even more dramatically faster than Linux on the graphics tests.

      • Re: (Score:3, Informative)

        by jfim (1167051)

        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.

      • Yeah, that's a pretty bad comparison. Were the testers at Phronix completely unaware of the performance work Sun has been putting into update 10? They've only been talking about it for like a year.

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

      They left on Aero, and acutally spent more money to get the version of Vista with it. The graphics chip was the weakest integrated chip that, according to the manufacturer, supported Aero. In reality, no doubt, the Intel chip pushes work onto the CPU because we know what happens when a manufacturer claims that the hardware is just able to support a feature. Hell, even their website phrases

    • The JVM still has to work with the OS to make things work so things are different between the the JVMs and performance can vary depending on how the underlying OS deals with certain things.
    • by Fweeky (41046)

      Java has quite a few tuning options; limits on heap and garbage pool sizes, different garbage collectors and strategies for running them, different optimization levels. Maybe it's defaulting to client mode on Windows, thus putting more effort into reducing memory use by running the gc before growing the heap (and placing stricter limits on its size and the sizes of the gc generation pools), doing less aggressive optimizations and putting them off later.

      Java also has bit of a history of enjoying cheap sys

  • Ray tracing in Java (Score:4, Interesting)

    by olddotter (638430) on Friday December 19 2008, @11:04AM (#26173393) Homepage

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

    • by Yetihehe (971185) on Friday December 19 2008, @11:10AM (#26173483)
      Yes. Sunflow [sourceforge.net] is one example. I did my own tests, java vs c++ (almoste the same code) and java was only about 1.3 times slower.
    • by shutdown -p now (807394) <int19h@@@gmail...com> on Friday December 19 2008, @12:20PM (#26174293)

      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.

  • Fairness (Score:4, Insightful)

    by abigsmurf (919188) on Friday December 19 2008, @11:04AM (#26173399)
    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.

    • Re: (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.
    • Re: (Score:3, Insightful)

      by Chirs (87576)

      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.

      • Graphics drivers have been continually improving on Linux.

        Intel, Nvidia and ATI hardware all works MUCH, MUCH better than it used to.

        Not that things are perfect, but it's important to point out that things are getting better all the time.

    • Re:Fairness (Score:5, Insightful)

      by Vellmont (569020) on Friday December 19 2008, @11:16AM (#26173551)


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

      • Re: (Score:3, Insightful)

        by abigsmurf (919188)
        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 up
          • Re: (Score:3, Interesting)

            by jellomizer (103300)

            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 tast

  • 3D in Java? (Score:4, Insightful)

    by SilentChris (452960) on Friday December 19 2008, @11:06AM (#26173435) Homepage

    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?

  • by Yahma (1004476) on Friday December 19 2008, @11:07AM (#26173451) Journal
    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.

  • Not surprising (Score:4, Interesting)

    by greg_barton (5551) <greg_barton@yahooCOMMA.com minus punct> on Friday December 19 2008, @11:08AM (#26173459) Homepage Journal

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

    Try it yourself. [nist.gov]

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

  • I was surprised (Score:5, Insightful)

    by spottedkangaroo (451692) * on Friday December 19 2008, @11:14AM (#26173537) Homepage

    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.

    • Re:I was surprised (Score:5, Interesting)

      by LWATCDR (28044) on Friday December 19 2008, @12:09PM (#26174191) Homepage Journal

      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.

      • Re: (Score:3, 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.

  • So javaQuake in an applet viewer is faster, try using ANY browser available for Ubuntu and load the applet in it... now use a naked IE activeX control (or even an IE window) to host the applet.

    Linux fails, because the overhead of running ubuntu gets COMBINED with the overhead of running FireFox of Epiphany or whatever, whereas windows overhead already includes IE.

    Pretty much the only thing "taxing" I use my laptop for is playing Runescape (browser hosted 3d rendered 100% java applet MMORPG) and with the
    • Pretty much the only thing "taxing" I use my laptop for is playing Runescape

      Please turn in your geek card now.

      • A laptop dedicated to an weird MMO is not geeky?

        I didn't say it was the most taxing thing I do on computers, just on that particular laptop...
  • by BigGerman (541312) on Friday December 19 2008, @11:32AM (#26173731)
    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.
    • by cheating:-)

      To be fair, you can usually get a bit of extra performance out of the windows version of superpi by running it in linux under wine than in windows.

      Unrelated, but amusing.

    • Re: (Score:2, Informative)

      Depends what you want. Vista will at least be somewhat usable on that configuration so unless you either don't know how to install Ubuntu, have XP that you want to run in a VM rather than dual-booting Vista, or want to save $50 you could always go with Vista because installing Ubuntu over Vista is trivial, and the hardware is going to be rather easy to work with Linux (no nVidia drivers, etc.) and the only other thing that Dell really installs for you is libdecss and other codecs which aren't too hard to fi
    • by Anonymous Coward on Friday December 19 2008, @11:06AM (#26173433)

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

        • by Count Fenring (669457) on Friday December 19 2008, @11:37AM (#26173813) Homepage Journal

          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 [fs-driver.org] 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.