also @ TechSpot: Next iPad rumored to be 33% lighter and thinner thanks to new touchscreen tech

Valve: L4D2 runs 20% faster on Ubuntu than Windows 7

By

On August 2, 2012, 3:30 PM Breaking News

With the advent of Steam landing on Linux drawing closer, Windows vs. Linux comparisons will become an inevitability. Although Valve's effort to port Steam over to Linux fans is still a work in progress, some onlookers may be surprised at the results thus far: Left 4 Dead 2 runs up to 20 percent faster in Ubuntu (OpenGL) than it does under Windows 7 (DirectX). In Direct3D mode, L4D2 hit 270.6 FPS on Windows while Ubuntu nailed a respectable 315 FPS.

Now, before readers begin praising and criticizing Valve's discovery, let us consider the details.

First, here are Valve's testbed specs: an Intel Core i7 3930k, 32GB RAM and a Nvidia GeForce GTX 680. The Linux testbed is running Ubuntu 12.04 (32-bit) while Windows relies on Windows 7 SP1 (64-bit).  It's interesting to point out that this is very high-end hardware for an aging game (released in 2009), but probably doesn't bear any criticial consequences on the results.

During internal testing, Valve claimed working with Linux and OpenGL actually helped developers improve L4D2's OpenGL performance under Windows. Although Ubuntu still maintained its edge, programmers were able to squeeze 303.4 FPS with OpenGL under Windows following some modifications. Although we can only reserve judgement for this scenario specifically, the open graphics standard actually performed faster than Microsoft's own graphics API on Windows. Fascinating.

Since Source, the engine which powers Valve's games, has had an entire decade to mature on Windows -- and the unfinished Linux port has only been in existence for a few months -- the favored performance delivered by OpenGL would seem unlikely. So, a poignant question to ask is: Why is Left 4 Dead 2 faster on Linux?

For starters, developers gave props to Linux for its kernel efficiency. Valve also touched upon OpenGL with its praise, claiming their analysis showed Direct3D suffered from slightly more overhead. The company also attributed its strong relationship with drivers and standards authors who have also helped optimize L4D2 on Linux.

"This experience lead to the question: why does an OpenGL version of our game run faster than Direct3D on Windows 7? It appears that it’s not related to multitasking overhead. We have been doing some fairly close analysis and it comes down to a few additional microseconds overhead per batch in Direct3D which does not affect OpenGL on Windows. Now that we know the hardware is capable of more performance, we will go back and figure out how to mitigate this effect under Direct3D."

"The third category is especially interesting because it involves working with hardware manufacturers to identify issues in their drivers and, as a result, improving the public driver which benefits all games. Identifying driver stalls and adding multithreading support in the driver are two examples of changes that were the result of this teamwork."

Source: blogs.valvesoftware.com

With the above in mind, I do believe there are some items to consider, particularly ones that Valve's blog post doesn't seem to flesh out.

Presumably, only the latest (and proprietary) drivers would be used as the basis for both Windows and Linux tests, but we don't explicitly know this. Additionally, L4D2 runs on DX9 under Windows -- a graphics API which pre-dates 2003. Unfortunately, the blog post also fails to mention what OpenGL version L4D2 is utilizing. It seems natural, for example, that newer OpenGL implementations may actually have an inherent performance advantage. OpenGL, afterall, strives to maintain backwards compatibility with previous releases (and older hardware), making it very possible that L4D2 is using a far more recent implementation.

There is also no talk regarding visual fidelity. Even small differences in visual quality can produce 20 percent performance gains, as both Nvidia and ATI have shown us in the past by "cheating" on benchmark tests.

Despite some healthy skepticism, it is great to see Valve making progress on the Linux platform and good to see it is learning from the experience as the project moves along. I, for one, am looking forward to Steam on Linux, although others may not be quite as enthusiastic.

, , , , , , , , , , ,

User Comments: 36

Got something to say? Post a comment
  1. Yes but instead of running on crappy windows it runs on linux

  2. I wager that in 2 years you'll still be wrong. Linux has never been and will never be a viable gaming platform. Game makers follow the money and since Linux will never be a mainstream OS there will never be a market for Linux gaming. /thread

    I'm sure that's what people used to say about Linux in the mobile platform as well. Then Google stepped in. They had great resources, bank account and a vision. Look how it is now. Of course Chrome OS didn't do so well (and I doubt it ever will in its current form).

    So 2 years? Not a chance. Never? We'll see.

  3. "There is also no talk regarding visual fidelity. Even small differences in visual quality can produce 20 percent performance gains..."

    That's a good point Rick!

    I would like to see video captures to ensure that they game is rendering correctly on both platforms. If I'm getting better shadows or textures, for example, under Direct3D I would be happy to lose the 20% performance given that 270 FPS is an average and not a single burst. Once I get minimum FPS over 60, I start to turn up quality settings any way.

    "Now that we know the hardware is capable of more performance, we will go back and figure out how to mitigate this effect under Direct3D."

    It seems that once performance is adequate, we stop optimizing. Its funny that there appears to be room to improve the FPS of this title even further, assuming that we're comparing the hardware as it appears to be. I wonder how many current/modern games could benefit from such performance analysis?

  4. Despite having been a fan of Windows OS (W7 being my favorite, but I hate W8), I've figured for some time it'd be obvious that a lot of application software, especially related to video games, would operate better with Linux/OpenGL than Windows/DirectX.

    Now if only more big game publishers would realize not only that but that it'd potentially make more money for them to slowly push away from Windows while supporting Linux. After all, $100~$200 individually for an OS is quite a bit of money that can potentially add up to hundreds of millions or billions of dollars into video games.

  5. Well to say the least even though opengl is faster. The point is im glad anyway lol Id rather much game on linux than on windows lol Since windows 8 has been out valve has decided to create games for linux and even blizzard is thinking the same way saying that, linux has got DirectX support anyway if we needed it and we have the ability thanks to Mono to use .net framework and much much more. I think it's time microsoft is going to start losing customers. It was all a matter of time.

  6. More companies need to look at optimizing their products to run better on current hardware/technology.

    Look at the amount of games (and even desktop software) today that run as poorly as they do compared to games of old. The excuse usually is "Oh, the hardware is a lot more powerful today so we don't have to do a good optimization code for people to run our games".

    In the end, this shafts the consumer, no matter what type of hardware you have; especially if the game is moddable. Developers don't know what people will do with their game/game engine in the future, and great optimization would solve a lot of issues that the community has, if not now, then later down the line.

  7. Obvious troll.

    This is superb news, and I'm really glad Valve are porting their games to Linux.

    Valve has demonstrated that Linux gives you a 20% performance improvement over Windows.

    Gamers notoriously tinker with overclocking to get their FPS up.

    I'll wager that within 2 years, Linux will be the preferred platform for hardcore gamers.

    I wager that in 2 years you'll still be wrong. Linux has never been and will never be a viable gaming platform. Game makers follow the money and since Linux will never be a mainstream OS there will never be a market for Linux gaming. /thread

    This is probably what people were saying about Apple a few years back...

  8. I thought their beef was with Windows 8. Shouldn't they be comparing Ubuntu to Win8? That would be more interesting to me. Valve needs to be careful. They may piss off more people than they gain with all this Ubuntu talk and Windows bashing.

  9. I wager that in 2 years you'll still be wrong. Linux has never been and will never be a viable gaming platform. Game makers follow the money and since Linux will never be a mainstream OS there will never be a market for Linux gaming. /thread

    I'm sure that's what people used to say about Linux in the mobile platform as well. Then Google stepped in. They had great resources, bank account and a vision. Look how it is now. Of course Chrome OS didn't do so well (and I doubt it ever will in its current form).

    So 2 years? Not a chance. Never? We'll see.

    I agree with Guest. Linux is only viable if everyone are onboard. At the moment, it's only Valve and Valve's own back-library. Where are Rockstar, Epic, EA, Ubisoft, Bioware, Blizzard, Eidos, THQ, Capcom, Square-Enix, 2K Games, Codemasters ?

    Unless these companies join up then gaming on Linux will be limited to Valve, Indie, and the free stuff.

    Other things that will never happen include,

    Valve open-sourcing their client - I doubt this is ever going to happen, Valve will lose control of their own client, DRM will be stripped from it, and a myriad of different versions will be out there. How many game companies will hop on-board a open-sourced client without even a single layer of DRM ?

    Free games - Lets face it, you are going to have to start paying for your games because never in a million years will these companies adapt a different strategy and give their games away. Not going to happen. Indie or Kickstarter, perhaps, but not the top Rockstars, Epics, Ubisofts. etc..

    Open-sourcing their games - Again, never going to happen. Plus, to me anyway, I don't see how it benefits anyone, but the ones who want this. Oh but were told that the community can improve the engines, fix bugs,and add improvements, well if you could do all that then surely you would be working for them, would you not? I mean, these top companies don't hire anybody, they hire the best.

    No DRM - Again, I really don't see this happening. Game companies need a layer of protection, even if one layer from Valve's own client gives them that 1-day protection from piracy, DRM is still going to be required if you want the top companies on-board.

  10. Obvious troll.

    This is superb news, and I'm really glad Valve are porting their games to Linux.

    Valve has demonstrated that Linux gives you a 20% performance improvement over Windows.

    Gamers notoriously tinker with overclocking to get their FPS up.

    I'll wager that within 2 years, Linux will be the preferred platform for hardcore gamers.

    I wager that in 2 years you'll still be wrong. Linux has never been and will never be a viable gaming platform. Game makers follow the money and since Linux will never be a mainstream OS there will never be a market for Linux gaming. /thread

    This is probably what people were saying about Apple a few years back...

    No comparison. Linux suffer from fragmentation of too many random distros and it does not embrace DRM, the two main complaints that game developers had about Linux.

    Until Linux address those two issues (most likely never), Windows will remain the dominant OS for gaming.

  11. No comparison. Linux suffer from fragmentation of too many random distros and it does not embrace DRM, the two main complaints that game developers had about Linux.

    Until Linux address those two issues (most likely never), Windows will remain the dominant OS for gaming.

    I'll confess, I don't know a huge amount about linux, however I think it would be wrong to write them off in terms of gaming for all of time. Things change. This could very well be the catalyst for a change.

Recently commented stories

Post a new comment

Social Login & Guest Posting TechSpot Members
Login here or sign up for free,
it takes about a minute.
Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.
TechSpot on:

Subscribe to TechSpot

Get free exclusive content, learn about new features and breaking tech news.