top | item 4327908

Valve Source Engine Running Faster on Linux than Windows

611 points| sarchertech | 13 years ago |blogs.valvesoftware.com | reply

238 comments

order
[+] exDM69|13 years ago|reply
I have to say that this is nothing short of a miracle. The OpenGL API is really hairy to implement at all, let alone making it fast. There's 20 years of accumulated legacy and design mistakes that the driver vendors need to care about. D3D, on the other hand has been re-designed on every iteration and backwards compatibility has been broken in every major release.

On the other hand, porting from D3D code, you don't touch the hairy parts of OpenGL at all because D3D is functionally quite close to the "clean parts" of GL. But there's still some software overhead to overcome. They might also be using a proprietary D3D-on-OpenGL layer, like the ones being used for some Mac ports of Windows games (edit: seems like they are not).

I hope that Steam, and gamers that use Mac and Linux in general, will push for bigger changes in OpenGL, both specs and implementations.

disclaimer: I write GPU drivers for living

[+] cs702|13 years ago|reply
For those who, like me, use desktop Linux full time, Valve's close collaboration with NVIDIA and AMD (i.e., ATI) to improve the performance of proprietary graphics drivers is a huge win.

Quoting from the blog post: "We’ve been working with NVIDIA, AMD, and Intel to improve graphic driver performance on Linux. They have all been great to work with and have been very committed to having engineers on-site working with our engineers, carefully analyzing the data we see. We have had very rapid turnaround on any bugs we find and it has been invaluable to have people who understand the game, the renderer, the driver, and the hardware working alongside us when attacking these performance issues."

Leaving aside the amazing fact that Valve is achieving higher FPS on Linux than on Windows, the great thing about efforts like this one is that we can all expect the Linux desktop to become even smoother, faster, more seamless. I love it!

[+] nathanb|13 years ago|reply
Seems to me like a huger win would be if the open-source graphics drivers would get improved.

I'm not even talking ideologically here. The OSS drivers are included along with the kernel in most distros. They're what you get by default when you boot a new Linux install. They get upgraded alongside other core packages by the distro's package manager and are generally quite up-to-date compared to the "official" drivers in the package repository (if they're even there at all).

I use the OSS radeon driver at home and the OSS nouveau driver at work, and both are quite adequate for my purposes (which involve no real 3D). I think it would be a bigger improvement to the ecosystem to have these drivers get some love.

(Or, alternately, for the proprietary drivers to go open-source and be included with the kernel).

[+] bnegreve|13 years ago|reply
> For those who, like me, use desktop Linux full time, [...] is a huge win.

Well I don't know... For the sake of attracting more users, Linux usage tends to become more and more Windows-like. Best illustration is the dropping of network transparency in Wayland because "most people don't care".

I suspect that there is going to be more and more concessions like this.

[+] moreorless|13 years ago|reply
This is huge. 2013 is going to be the year of Linux on the desktop. :P
[+] yobbobandana|13 years ago|reply
Here's the submission that linked to the actual blog post, not to the whole damn blog:

http://news.ycombinator.com/item?id=4326619

[+] learc83|13 years ago|reply
And that post didn't make it to the front page, because the title wasn't very descriptive.

I wanted to read some real hacker news discussion, which we're now getting with a better title.

[+] NPC82|13 years ago|reply
Steam working with hardware vendors on Linux drivers means everyone in the Linux community benefits. This is fantastic news.
[+] mlitwiniuk|13 years ago|reply
Yeah. And one of anti-linux arguments for Windows fans is just getting killed - gemes do run on Linux. If this experiment will be a success for Valve, we only can wait for other game producers to follow their steps. And taking under consideration that not everybody is going to like Windows 8, this can be a beginning of revolution!
[+] johnchristopher|13 years ago|reply
> 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.

Why wouldn't they switch back to OpenGL on windows then ?

Besides the absolute numbers I wonder how the hardware is behaving regarding resource intensive applications games are. From personnal experience every laptops and computers I have owned had had their fans spinning much louder when running ut2004 (and other games) on linux than on windows. Whether because it's getting hotter for less computational power or because of more aggressive default fan settings in distros.

[+] exDM69|13 years ago|reply
> Why wouldn't they switch back to OpenGL on windows then ?

Because no-one likes to program with OpenGL. Because of it's history, it is one of the hairiest APIs out there. Try to propose using OpenGL to a game developer and you'll be laughed at.

Many GPU vendors have been doing a bad job with OpenGL windows drivers and they have been really buggy, but the situation is improving.

I write OpenGL because I don't use Windows. I still hate it.

[+] CJefferson|13 years ago|reply
> Why wouldn't they switch back to OpenGL on windows then ?

Because for many cards, the opengl drivers are awful. If you are only implementing one of DirectX and OpenGL on windows, there really is no contest. Of course, you could do both, but then you have another option to give users, and two very different codepaths to test.

[+] rbanffy|13 years ago|reply
Last time I checked, Windows OpenGL support was half-hearted since the Vista days. From Microsoft's PoV, making OpenGL a viable target on Windows would make porting games to other platforms easier. My bet is that they'll try to avoid it if they can.
[+] Mavrik|13 years ago|reply
I might be the only sceptic here, but the fact that it seems that Valve has conflict of interest when it comes to Microsoft lately (see Gabe's comments) makes me doubt the authenticity of these results.

I'd love to see real performance improvements when it comes to Linux, but right now I just see a company that (it seems) has something to gain by smearing Microsoft giving out results without any methodology or explanation. They never even said how they avoided the typical pitfall of "FPS" benchmarking - making sure the GPU and the engine is actually drawing the same things (that means making sure all the same shaders are executed, similar extensions are used so that image quality is identical).

Until we get some confirmation in the wild I'll remain highly sceptical towards claims on the blog.

[+] jcfrei|13 years ago|reply
I've noticed that quakelive runs noticeably faster on linux than on windows. strangely though this doesnt seem to be related to fps, but rather appears to stem from mouse latency (in other words the game just appears more responsive on linux) - has anyone made similar observations?
[+] Karunamon|13 years ago|reply
Could be the mouse acceleration.. great for general use, rubbish for gaming.

Windows makes you jump through many hoops (think registry hacks) in order to disable that function on almost any version of their OS. I don't know of any Linux distros (correct me if I'm wrong here) that do that by default.

[+] rogerbraun|13 years ago|reply
As a counterpoint to the "OpenGL needs to start from scratch" discussion, take a look at JWZs blog about porting XScreenSaver to iOS: http://www.jwz.org/blog/2012/06/i-have-ported-xscreensaver-t...
[+] ajross|13 years ago|reply
Indeed. The death of the immediate draw APIs is something that only driver writers and serious optimization wonks think is a good idea. For everyone else, it simply makes ES2 an API that is basically impossible to learn. Without exception, everyone I know who does any 3D work at all learned first on 1.1 doing flat shaded fixed function stuff.

And all those APIs are gone. The amount of code required in ES2 to put anything on the screen at all is staggering.

But that said: the per-vertex APIs really are broken from an optimization sense, and serious apps absolutely must do their work on buffer objects. (Display lists have historically been a way to cheat this, at the expense of huge complexity in the driver. This is one of the bad APIs exDM69 is talking about, I suspect.)

[+] exDM69|13 years ago|reply
OpenGL's role in the software ecosystem has changed since GL 1.x was relevant. Back then it was used as a 3D rendering API (with lights and cameras and such). Today it is used as the standard interface to programmable graphics hardware. GL2+ knows almost nothing about "3d" or lighting and is essentially used for drawing triangles, very fast.

If you need a 3D engine, use a 3d engine. If you're writing a 3D engine, you use OpenGL.

OpenGL should start from scratch and change their name and code naming conventions so no-one would be under false illusions that you can take OpenGL code from 1996 and make it work on OpenGL in 2012.

That would have kept JWZ happy and others who complain about the lack of fixed function and immediate mode in OpenGL too.

Btw. once you get past the basics in GL 1.x fixed function, everything becomes /ridiculously/ difficult. Look at how Quake 3 did their "shaders" for example.

[+] timkeller|13 years ago|reply
2013 - the year of the Linux desktop! We always knew it would happen, eventually.
[+] hxf148|13 years ago|reply
I still would like to know what Valve and Blizzard have encountered with Win8 that makes it trouble. I have not had any problems with Steam and WoW. Maybe they do mean drivers though..
[+] __alexs|13 years ago|reply
The VentureBeat interview [1] makes it look like gaben is referring to the changes in app ecosystem (eg. integrated Windows Store with 30% margins) rather than a specific technical problem. Although I suspect a major games studio coming to Linux might also enjoy the ability to poke around the source for the few graphics drivers which are open.

1. http://venturebeat.com/2012/07/25/valves-gabe-newell-talks/

[+] forgottenpaswrd|13 years ago|reply
Oh, I don't know...

Maybe it has something to do with the Microsoft App Store and MS being the gatekeeper that decides if an app runs or not there. Oh, and by the way getting 30% cut of the price of the software, all software a la Apple.

[+] mtgx|13 years ago|reply
Windows 8 is a change in direction for the Windows app ecosystem and for the user interface as well. Valve games make a lot less sense on a touch interface, and they worry that's where Microsoft is quickly heading - to a Metro-only future. A future where everything also has to come through the app store.

No matter what kind of company you are, whether a software or hardware one, if you're doing "well" in the current/status quo Windows environment, then Windows 8 is a threat to you, because it will change a lot of things, and most likely for the worse for regular "PC-oriented" companies.

[+] mrich|13 years ago|reply
Maybe the new app store, which may drive down their profits from steam a little ;)
[+] foobarian|13 years ago|reply
In their one test app they observed FPS values of 315 on Linux, and 303.4 on Windows. This seems small enough that it's a stretch to call it "trouble" on Windows--probably wouldn't even notice it.
[+] neya|13 years ago|reply
Yep, most probably. For ex: I have had audiophile-grade sound quality differences in Linux (Ubuntu 10.04) and Windows (Windows 7) due to the drivers [1].

[1]Dual boot on a Sony Vaio FZ-21S, with onboard ASIO chipset, headphones - Pioneer SE-A1000 (Equivalent to a Sennheisser HD - 595) with no equalizers.

[+] biirdmaan|13 years ago|reply
I don't think it has anything to do with the OS itself. At least not in a "oh well now making games for Windows is 50 times harder!" way. It's mostly a disagreement with MS's push for an Apple-like app store for a DESKTOP OS.
[+] nbevans|13 years ago|reply
They don't state whether the comparison between DX and OGL was running identical quality rendering or not. Given that OGL doesn't support many niceties that DX does; one can assume not.

Which would make the entire comparison completely pointless. To the point of the blog post almost being a trollpost. Valve have a clearly defined agenda here, remember.

[+] SkyMarshal|13 years ago|reply
I wish they'd add Wine as a 3rd 'OS' for comparison. Currently they're comparing Ubuntu 12.04 native vs Windows 7, would be really interesting to add the benchmarks for the Windows version running on the latest Wine on Ubuntu 12.04.
[+] xentronium|13 years ago|reply
Take these results with a grain of salt:

> We are using a 32-bit version of Linux temporarily and will run on 64-bit Linux later.

[+] alexholehouse|13 years ago|reply
Maybe a stupid question and I've missed something, but why even bother telling us they're using 32GBs RAM for benchmarking if they're using 32-bit Ubuntu? Just to be totally transparent? Is Windows a 32-bit W7 too?
[+] rmk2|13 years ago|reply
I'm not sure if this is the right answer or not, but the Linux kernel has supported PAE[1] for ages, which allows for more than 4GB of RAM in a 32-bit OS (though it remains unusable by a single process, if I understood that correctly). Maybe someone else with a better understanding of the 32bit/64bit differences can chime in.

[1]: https://en.wikipedia.org/wiki/Physical_Address_Extension

[+] Splines|13 years ago|reply
I've only dabbled in Linux, but what's the advantage of using 32-bit Ubuntu? Why not the 64-bit version? Especially in the Linux world where you deal with binaries less-often compared to Windows.

Is it because of the video card drivers?

[+] danielweber|13 years ago|reply
Am I expected to have 32GB of RAM to play Steam games? Even my office computer only has 8GB of RAM.

I've stayed out of PC gaming for a long time because it seemed to have a fetish for spending lots of money on graphics cards.

EDIT: Am I being downvoted because it's stupid to ask about 32GB because obviously every Real Gamer already has that, or because it's stupid to ask about 32GB because obviously no one needs that?

[+] IsTom|13 years ago|reply
I don't think this game will use 3 GBs of RAM. If that's the case it doesn't matter that much.
[+] geon|13 years ago|reply
315 FPS?

I was told that frame rates over what you can actually see tells you very little about the actual performance. So implementation A at 315 FPS being 10% faster than B might very well be 50 % slower than B at 60 FPS.

What is interesting is if the frame rate can keep a steady 30/60/120 FPS. Anything above that is just not indicative of actual performance.

[+] jiggy2011|13 years ago|reply
Surely if they are both doing 60fps then by definition the performance will be the same? I guess the time spent doing the actual rendering vs waiting to do the next frame might be different, not sure if there is a reason that the characteristics would be different at 300FPS and 60FPS though since surely the only difference is how often the render code is called?

Bare in mind that Valve is running this test on a much higher end PC than most consumers are likely to have. People will want to be able to run these games on their $500 laptops , so the difference between 270 and 315 FPS might translate into a difference between 50FPS and 60FPS which would be noticeable.

[+] kcbanner|13 years ago|reply
It completely is indicative of actual performance. You could turn on vsync in either of these applications and it would lock down to 60 FPS. The point is here, that with the same game implementation you have some more performance headroom on Linux. You could potential improve the engine in some way and use up that headroom, which would bring the performance into line but with some sort of graphical quality improvement on Linux (OpenGL).
[+] naitbit|13 years ago|reply
I would agree that it may be better if they showed result for lowest FPS (instead of average) and on weaker system(were difference would matter far more). They probably tested on powerful developer workstation because it was the machine that they already program on.
[+] AshleysBrain|13 years ago|reply
Benchmarking is done with uncapped framerates to measure the relative performance of two systems. If you're a gamer, yes, you most likely won't see anything above 60 FPS, but the difference still matters if your hardware is 5x slower (54 FPS vs. 60 FPS)
[+] jeffool|13 years ago|reply
Maybe someone smarter than me can tell me why they don't reboot OpenGL? Or better, leave the current run as is for the CAD folk, then run a new API, "OGL-Game".

Also, I got bored the other day... I can't help but wonder if Valve would push a desktop of their own devising?

Anyone know of any interesting hires that may have gone under the radar?

[+] jeffool|13 years ago|reply
While I love the idea of free and open software, I have to admit an ignorance to it in application (well, at least Linux).

Valve creates a Steam client, and gets the Source game engine running awesomely on "Linux". How do all the different desktops factor into this?

[+] ktizo|13 years ago|reply
PC games players are speed junkies. If this all goes through, then I would not be surprised to see games players migrate to linux in droves.
[+] vacri|13 years ago|reply
They're 'irritant avoiders', not 'speed junkies'. Once you get a framerate that's fluid, the drive to up speed even further is largely confined to a tight niche. Computers are generally fast enough now - I used to know a few overclockers back when it made a difference, now I don't know any.
[+] chucknelson|13 years ago|reply
A bit of a generalization there. For all of the players cranking away at Starcraft II, Quake III, and Counter Strike, you have plenty of "slow" players enjoying games like Skyrim, a gazillion indie games, etc.

Oh, and Farmville ;)

[+] pjmlp|13 years ago|reply
Usually the gaming community does not care about open source.

Gamers use whatever platform their favorite games are available on.

[+] HelloMcFly|13 years ago|reply
I really don't see this happening. They might give it a try, sure, but I'd bet the lion's share of them would be back on Windows in a week. Linux is just not as easy to use for most people, and when push comes to shove they'll go back where they feel safe knowing how things work, and knowing that things will work in the first place.

I know many people are diehard about Linux, but it's a big commitment to switch and it isn't easy. Even so, many users might make the switch to find Linux seems to introduce a lot of headache and perceived restrictions on capabilities that Windows doesn't. Sure, they could probably tweak their way past the difficulties, but after troubleshooting on a wiki or in forums for a couple of hours it would lose the flavor for the masses.