Saturday, February 16, 2013

Comparison of Linux Desktops OpenGL Performance

With Steam officially being released for Linux I took some time out this evening to run a few benchmarks on my Ubuntu 12.04 based Bodhi system to see how a few of the different modern Linux desktops compare in terms of OpenGL performance with the source engine. Please do not take my numbers to be anything super scientific or precise. I simply recorded a short demo using Team Fortress 2, loaded TF2 from Steam under each of the Linux desktops with no other background applications running and ran the demo through a built in source engine bench marking tool.

The benchmarks were run on my very modest gaming laptop which sports an i7 processor, 6GB of RAM, and an nVidia 330m GT graphics card. I utilized the Steam recommended nVidia 310 driver for these tests. All the desktop setups I used were "stock" from the Ubuntu 12.04 repos, minus E17 which is using the E17.1 snapshot and Bodhi's laptop profile with compositing enabled.

Lets get right to the data shall we? You all love charts I hope!


It is clear from the bar graph that E17 came out towards the top and Gnome Shell was near the bottom. Here are the numbers to a single decimal place:
  • Gnome Shell - 51.5 FPS
  • KDE   - 55.0 FPS
  • XFCE - 55.7 FPS
  • Unity  - 60.5 FPS
  • KDE, Disable Compositing on Full Screen - 63.2 FPS
  • LXDE - 66.5 FPS
  • E17     - 66.7 FPS
I was not surprised when I saw E17 and LXDE had the best performance, they are after all some of the best light desktops today. What did shock me though was that XFCE - which claims to be fairly light - was very low in terms of performance! 

Based on the above numbers XFCE performed around 17% slower than both LXDE and E17, while Unity was around 9% slower than the lighter desktops, and Gnome Shell was a staggering 23% behind.  One other thing worth noting is that KDE has a HUGE performance difference when you check the "disable compositing on full screen applications" box in your Kwin settings. In fact ignoring this setting loses you around 13% in performance:


Obviously someone should run some further tests (I know I plan to when I get some more time), but from my initial small test it is obvious - if you are looking to game on Linux your choice of desktop very clearly matters!

~Jeff Hoogland

42 comments:

  1. Would had liked to see how gnome 3 stacks up.

    Wouldn't be surprised if it sees more usage than kde and xfce combined.

    ReplyDelete
    Replies
    1. There was no gnome shell yesterday when I posted the comment.

      Delete
  2. It.s probably because You use differrnet kernel with each GUI. I don't belive in such comparizons, all the distro's based on ubuntu 12.04, now we have 12.10. There are another linuxes like arch, fedora, opensuse. Always compare product to the latest release.

    ReplyDelete
    Replies
    1. Wrong. All these tests as I mentioned where done on the same system. With the same kernel. With the same graphics driver version. The kernel was 3.7 at that - so not anything that "old" in terms of software even.

      Don't assume false information and post it on the internet - that is the reason we have so much crap everywhere.

      Delete
  3. If you're that worried about squeezing out FPS in your games just run them in a separate X server without any desktop or window manager. You'll be much happier and more productive picking a desktop environment for reasons other than performance.

    ReplyDelete
    Replies
    1. Sure, but telling a "normal" person to do this while gaming on Linux makes the platform seem really janky.

      Delete
    2. Actually even better it to use the 'big picture mode' that steam install.

      i.e at the lightdm manager as well as your usual desktop options (unity,kde, etc) you will also have a new option 'steam' - this boot straight into steam without loading ANY desktop - i.e more resources available for gaming.

      i.e http://www.webupd8.org/2012/12/better-steam-for-linux-performance-with.html

      You should test that mode for comparison.

      Delete
  4. Depends on your Xfce distro the most Distributions bundle their Xfce desktop with gnome apps so try this again with a debian netinstall Xfce which uses slim or xdm as desktop manager

    ReplyDelete
    Replies
    1. I'm also curious if the XFCE test was done was done with Composite enabled or disabled. Quite probably with composite enabled.

      Would be nice to see what the difference in performance is when comparing between these two settings.

      Delete
    2. Like I said - whatever the defaults are for Xubuntu. I don't enjoy using the other desktops much so I didn't spend much time configuring them. I figure most users are leaving things fairly stock.

      Delete
    3. That's the first thing that came in my mind too.. i would like to see the difference, yet the composition settings are fairly easy to find in settings/Window manager tweaks/compositor and i think its disabled by default.

      This is a great info to have and thank you for the time you spend to share it.

      Delete
    4. slim vs xdm or extra gnome apps installed are not relevant to the desktops wm/compositor and if it gets in the way or not and by how much, if it does.

      Delete
    5. Xubuntu is a fair bit more resource intensive than vanilla Xfce. It might be more accurate to label that column "Xubuntu Desktop" or something like that. Of course the information is still quite relevant. I just think it ought to be clear what it is (I use Xubuntu on some machines, incidentally).

      Delete
  5. Are you sure you used the option to shut down compositing while on a full screen Window on KDE?

    That's a deal breaker.

    ReplyDelete
    Replies
    1. No idea - stock Kubuntu settings were used for KDE. If that is a "deal breaker" setting it should be on by default right?

      Delete
    2. please read my blog posts linked below. In one of them it is explained why we turned the feature off.

      Also we have an even better setting than the unredirection of fullscreen windows: a window rule to disable compositing (that is no longer any OpenGL context around) if a specific window is running and each window can request that by just setting an X property.

      Delete
    3. I try not to advertise other places here - so I removed those links. Sorry.

      Delete
    4. sorry that is a bad joke. You delete important background information by the KWin maintainer? Seriously? Is it related to the fact that the blog post questioned the usefulness of such a test? Is it that it shows the mistakes done in such a test?

      I would appreciate if you could restore the links. It's important information to your readers and the media is already spreading the FUD about KDE being slow. I don't want to have to put a counterstatement on my blog.

      Delete
    5. Have you tried loading KDE4 on a Raspberry Pi or other low power PC? It is a DOG compared to E17 or LXDE.

      Delete
    6. > Have you tried loading KDE4 on a Raspberry Pi or other low power PC? It is a DOG compared to E17 or LXDE.

      Uh a strawman! Your post here is about game rendering performance, right? And you figured out here in the comments that on KDE Plasma a setting for KWin is relevant for the performance, right?

      Now people come here and point out that this is not the right thing to do for KWin, right? So you reply by pointing out to Raspberry Pi?

      What's wrong with that: KWin does not even support compositing on the Pi. So maybe there is no relationship between KDE Plasma being slow on the Pi and the game rendering performance on desktops?

      And yes I have been using KWin on the Pi without performance problems, but I have only been running it on top of LXDE. I have also seen full Plasma sessions and the try to use Plasma with openbox. The result of that was: KWin does not matter for the performance of Plasma on the Pi.

      That said: great job by the enlightment team to run great on the pi. But please don't spread FUD about other environments, thank you.

      Delete
    7. I'm a strawman? I said KDE - not Kwin. Nothing I've said has been targeted at Kwin directly - but KDE (which uses kwin by default sure). I even went so far in this post as to play with some of the "Advanced" settings in Kwin to get better performance out of KDE - so I'm not sure why you are acting like I am attacking your work.

      I was honest with what versions I used of everything - and I even said I at the end people should try things for themselves and run their own numbers. So please - Team Fortress 2 is a FREE game. Record your own benchmark and post it yourself!

      Why is running OpenGL based tests "not the right thing for Kwin"? What makes it so different that it is fine to do on EVERY OTHER DESKTOP for a test, but not Kwin?

      Delete
    8. @martin: Just FYI, e17's default out-of-the-box config is to never turn off compositing (just like KWin - for the same reasons - bodgey drivers), but it has the exact same optimization options available. Just turn on "Don't composite fullscreen windows" and it will shut down the compositor when fullscreen windows turn up automatically. YMMV depending on driver. So I totally understand your point here about such options. Same problems and issues and options etc. - I don't know if Jeff has enabled or disabled E17's option for turning of compositing for fullscreen windows, but as long as both KWin and E17 are doing the same thing (keeping comp on or off in the same situation), then it's a fair comparison.

      Delete
  6. Shame on you Jeff for removing Martin's links!

    He's Kwin's main developer so he knows what he's talking about.

    And removing content from posters, even if it's your right, seems very rude, I'm sorry to say it because I like your blog and the discussions that ensue.

    Hope you can restore Martin's links if possible, as his posts are usually very good (though a bit too highly technical sometimes) and it would be interesting to know the reasons for that setting to be off by default.

    And, it might help in your next performance tests.

    Cheers.

    ReplyDelete
    Replies
    1. I don't have time to verify every link everyone on here posts is valid and not spam - so in general I just remove all outside links. Sorry if this offends some, but this blog I do NOT get paid to write.

      If you'd like to hire me some staff or pay me some commission to spend time checking all comments aren't truly spam I'd be happy to have things manually get checked.

      Delete
    2. Plus if I need to read technical writing to get decent performance out of KDE/kwin then it really sounds like it is not worth my time. E17 and LXDE both provide great performance "out of the box". Like modern Linux desktops should.

      Delete
    3. yeah and KWin is doing the same. It's just (as explained if you would have taken the time to read) that we do not put our focus in default settings on gaming. Any distribution could do that if they find gaming a more important usecase than normal desktop usage.

      Delete
    4. Why do you have to draw a line between "desktop performance" and OpenGL performance? Why can't you have both? E17 and LXDE seem to manage it just fine.

      Delete
    5. > Why do you have to draw a line between "desktop performance" and OpenGL performance? Why can't you have both?
      Please read the linked blog posts which explain that
      > E17 and LXDE seem to manage it just fine.
      So you tested a recent E17 version against our two releases old KWin? Do you consider that as fair? I don't. Does LXDE use OpenGL based compositing by default?

      Delete
    6. @Martin, no LXDE is basically a set of tools (taskbar/panel,filemanager,etc..) on top of Openbox. Openbox uses the xcompmgr composter, but not by default. However you probably knew all that.

      Delete
    7. Peculiar, Jeff, that you claim you don't have time to "verify" links (which in this case, I'd assume it would be astoundingly simple to verify a link posted by Martin simply by looking at the URL), yet you seem to have plenty of time to write articles and respond to comments.

      Delete
    8. Again - feel free to post any CONTENT you want that are not links in my comment section. The time I put aside for this website is for writing posts and sometimes responding to comments - not verifying every random link of which dozens get posted everyday.

      Delete
  7. It's very difficult to call XFCE 'Light' anymore. I've noticed it getting more and more heavy with each new release.

    There is a huge performance difference between XFCE 4.0 and 4.10. It's disgusting, Devs have lost their way.

    ReplyDelete
    Replies
    1. Agreed. I dropped Unity for the newest XFCE to only find a similar speed experience. Went back to Unity, for now.

      Delete
  8. I'd like to see Cinnamon desktop (with desktop effects off and on) in this roundup.

    ReplyDelete
  9. I was just wondering about Mate....

    ReplyDelete
  10. And no tests using DWM???

    Probably the next best test, aside from running a control Xorg only Session.


    A true scientific test would have absolutely had a control scenario. First, perform a test with an X/Xorg only Session. A second text only using DWM could further justify the tests of the initial control session, as DWM only has 1,000 lines of code, and would likely rule out any stray scripting when loading those bulky desktop managers.

    ReplyDelete
  11. E17 is dead dude....

    ReplyDelete
  12. Actually with E17 the theme really affect the performance.

    The default E17 theme outperform any other theme i tried.

    ReplyDelete
  13. Great post Jeff - it will make me shift from XFCE. Even KDE(no compiz) is better.

    But wow! any comparison test seem to bring out the Fanboi's and their dogs all howling "unfair, unfair!". So as you say, why don't they go and do their own "fair" tests and post the results?

    ReplyDelete