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

By on August 2, 2012, 3:30 PM

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
spydercanopus spydercanopus said:

L4D2 looks amazing in 3D. I think Valve has an excellent engine. Comparing visual quality, FPS, and flexibility, it beats any other engine.

von kain von kain said:

32gb ram on an x86 os? doesnt that means it will be able to use under 4 gb of ram?

Guest said:

great so now I'll get 240fps instead of 200 fps.*rolls eyes* The game is already ultra efficient as hell on Win7, so this is all pointless.

utdream utdream said:

32gb ram on an x86 os? doesnt that means it will be able to use under 4 gb of ram?

You can use more then 4GB on a 32-bit machine using PAE (Physical Address Extension: [link] but I thought that was interesting as well. Doesn't seem as efficient.

yRaz yRaz said:

32gb ram on an x86 os? doesnt that means it will be able to use under 4 gb of ram?

It was just the control. Both systems have to be identical if you want to test the difference in the OS.

ikesmasher said:

great so now I'll get 240fps instead of 200 fps.*rolls eyes* The game is already ultra efficient as hell on Win7, so this is all pointless.

how dare they make their game more accessible. how dare someone actually want to make a good procuct.

Guest said:

great so now I'll get 240fps instead of 200 fps.*rolls eyes* The game is already ultra efficient as hell on Win7, so this is all pointless.

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.

dividebyzero dividebyzero, trainee n00b, said:

Sweet....

The majority of PC gamers are bemoaning "console posts" and wish D3DX9 games would just quietly fade away. How well does a linux distro handle games coded for DX11/11.1 API ?

Why is Left 4 Dead 2 faster on Linux?

Isn't it obvious? Less overhead. Windows is pretty much plug and play with virtually all hw/sw......linux ? Jack-of-all-trades usually means sacrificing specialization for a broad range of applications. Windows handles DirectX and OpenGL, along with all the graphical options available to the drivers CP - How much of this is available in Linux?

Quite a full court press regarding Valve's Steambox/linux promo - the article today, the Stallman pronouncement a couple of days ago, likewise the Gabe Newell rhetoric ...unfortunately the truck-and-trailer approach tends to cast an shadow of cynicism.

So yay for linux and L4D2, but I wouldn't read a great deal into it.

Guest said:

VALVE saying one VALVE game runs better on an OS it's trying to do business with? Hmm...

What about other non-VALVE games? What about a game that use DirectX 11?

Not trying to say VALVE is being biased but it would certainly look better if a different company did this with different and up-to-date games.

gwailo247, TechSpot Chancellor, said:

Why is everyone surprised? Ubuntu made my 10, er 12 year old computer boot like a i7.

Guest said:

What I don't understand is why Valve is so determined on nitpicking on Microsoft and their technologies. Perhaps they have some sort of grudge?

lawfer, TechSpot Paladin, said:

They should test this against DirectX 11.1. Otherwise, doesn't seem very fair.

Det Det said:

They should test this against DirectX 11.1. Otherwise, doesn't seem very fair.

It doesn't seem fair that they're not using the absolutely most-bloated DirectX version there is? Doubt it's OpenGL 4.2 they're using either. The newer versions just basically _add_ features. This means that the newer, more visually stunning versions of OpenGL and Direct3D are _slower_ than their predecessors.

What I don't understand is why Valve is so determined on nitpicking on Microsoft and their technologies. Perhaps they have some sort of grudge?

Try Windows 8 and say that again. Gabe doesn't hold any grudge against MS. It's just the stupid Windows 8 that people (including him (and myself)) hate.

Det Det said:

What about other non-VALVE games? What about a game that use DirectX 11?

Not trying to say VALVE is being biased but it would certainly look better if a different company did this with different and up-to-date games.

And the same thing here. DirectX 11 games are not "faster" than DirectX 9. The more "up-to-date" games with DirectX 11 would require comparison with OpenGL 4.2, which would require shedloads of rewrites for a lot of stuff in the project. And then think that you'd actually have to equally optimize both to get a result that you could even somewhat realisticly rely on.

bnathan bnathan said:

Valve are only protecting their investment in Steam. If I spent the last 10 years building the number one games distribution service and then Microsoft who controls the PC industry is now launching Windows 8 which has a store to purchase games wouldn't you be afraid??? The more fear that Valve generates over Windows 8 the more sales they are likely to retain. Its pretty petty but that's why Valve is pissed at Microsoft pure and simple. Windows 8 is a faster version of Windows 7 with a new start menu instead of it popping on the bottom left its full screen. What's to hate?

dividebyzero dividebyzero, trainee n00b, said:

Gabe doesn't hold any grudge against MS

It would be pretty poor form if he did considering he worked for them for thirteen years and made most of his initial millions via MS

It's just the stupid Windows 8 that people (including him (and myself)) hate.

Well actually he reserves some hate for PS3 but lurves Xbox...

No. That's not right. He reserves hate for Xbox but lurves PS3

Zeromus said:

They changed the picture for this article. Lol.

Guest said:

bench something that is not crappy and then we'll talk.

Guest said:

IF we can get major titles on Linux it will be fantastic.

It will also breathe new life in to a sluggish PC market.

Guest said:

On the specific news that this particular game runs faster on Linux than Windows is nice but not really a huge deal. The big news is that a game originally designed for Windows is running natively on Linux and can be purchased via Steam and that Valve is showing a way for game companies to expand their market to Linux. This is a big win for Linux and should help it to become a better platform in general.

lawfer, TechSpot Paladin, said:

It doesn't seem fair that they're not using the absolutely most-bloated DirectX version there is? Doubt it's OpenGL 4.2 they're using either. The newer versions just basically _add_ features. This means that the newer, more visually stunning versions of OpenGL and Direct3D are _slower_ than their predecessors.

Try Windows 8 and say that again. Gabe doesn't hold any grudge against MS. It's just the stupid Windows 8 that people (including him (and myself)) hate.

Your comment makes no sense. What makes you think the latest versions of OpenGL and DirectX are actually <I>slower</I> than their predecessors? So by your logic DirectX 9 is faster than DirectX 10? Please.

And no, Gabe just said that because the inclusion of the Windows Store is a threat to Steam. And you and others don't hate Windows 8, you hate the Start Screen.

Joel F Joel F said:

My gaming rig is Ubuntu 10.10 that I first customized with the UCK. I have GCC 4.7.1 with CUDA libraries. I compiled WINE 1.5.9 with OpenCL support and optimised with -bdver1 (The new AMD CPU that Windows seems to struggle with). Things run very smoothly. There are only a handful of games that run poorly like TFC2 and I haven't figured it out. Diablo III and WoW run silky smooth. I play Mirror's Edge and GTA IV.

Ubuntu is just way faster all around, has more visual bling, more fun to use, highly customisable, and runs faster just based on not having to run an antivirus software in the background.

I quit using all Windows OSs back in 2010 when I tried out Ubuntu and it worked, out of the box, much better than Windows without having to download stupid drivers or getting a virus. :-)

Det Det said:

Yes. A game optimized for DirectX 9 runs worse with 11. And games with improved graphics run worse than without them. DirectX 11 in itself was basically just a performance update.

And no, Gabe just said that because the inclusion of the Windows Store is a threat to Steam. And you and others don't hate Windows 8, you hate the Start Screen.

Wrong. He said it because it really _does_ suck.

And I hate Windows 8 because Metro is part of Windows 8. The Start Screen is not the only part of it. The menu was removed too.

Guest said:

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

treetops treetops said:

Windows 7 has higher system requirements, it uses more resources is that what you all mean by overhead?

1 gigahertz (GHz) or faster 32-bit (x86) or 64-bit (x64) processor

1 gigabyte (GB) RAM (32-bit) or 2 GB RAM (64-bit)

16 GB available hard disk space (32-bit) or 20 GB (64-bit)

DirectX 9 graphics device with WDDM 1.0 or higher driver

Ubuntu Desktop Edition

700 MHz processor (about Intel Celeron or better)

512 MiB RAM (system memory)

5 GB of hard-drive space (or USB stick, memory card or external drive but see LiveCD for an alternative approach)

Guest said:

Yes but instead of running on crappy windows it runs on linux :D

Det Det said:

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.

9Nails, TechSpot Paladin, said:

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

Meijin Ryuu Meijin Ryuu said:

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.

Guest said:

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.

DAOWAce DAOWAce said:

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.

DanUK DanUK said:

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

jwmcafee1970 jwmcafee1970 said:

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.

Gambit Gambit said:

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.

Gambit Gambit said:

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.

DanUK DanUK said:

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.

Load all comments...

Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...
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.