Valve Shares Performance Numbers On Port of Left4Dead
New submitter nschubach writes in with an update on Valve's progress porting one of their games to GNU/Linux. From the article: "One factor in creating a good gaming experience is throughput. This post discusses some of what we've learned about the performance of our games running on Linux. ... After this work, Left 4 Dead 2 is running at 315 FPS on Linux. That the Linux version runs faster than the Windows version (270.6) seems a little counter-intuitive, given the greater amount of time we have spent on the Windows version. However, it does speak to the underlying efficiency of the kernel and OpenGL. Interestingly, in the process of working with hardware vendors we also sped up the OpenGL implementation on Windows. Left 4 Dead 2 is now running at 303.4 FPS with that configuration."
nschubach adds "It seems there are good things coming out of this for both Operating Systems!"
LINUX DESKTOP
To be fair, it was their porting to to Open GL that improved the windows Open GL performance. What I find more interesting, to be honest, is that Open GL is (slightly) outperforming Direct 3D on a windows/nvidia box.
What I found interesting was how much an improvement this is from their initial port.
Their very first version ran at a full six frames per second (167ms/frame). They've now gotten it up to 315 fps (3.17ms/frame).
That's some pretty impressive work. Pity the article is so light on the details of how they did it (I'll spare you reading the article: they found places where it ran slow due to the kernel, they found places where it ran slow making OpenGL calls, and they found places in the driver itself that ran slowly - that's about as much detail as the actual article gives you).
Takeaway: the linux kernel and OpenGL are arguably more efficient than their Windows-based counterparts. I think a lot of people have thought this to be true for years, but it's always nice to see solid comparisons. It's a good time to have a linux box!
Probably that, when dealing with GPU-limited things like framerates in a moderately intensive OpenGL application, a substantial portion of your performance is going to come down to the togetherness between your application and the GPU vendor's drivers, so working with said vendors might help...
From what I understand, OpenGL has more features because they support extensions where Direct3D has to wait for Microsoft support. Granted, this requires that the developer actually use those extensions. The blog is rather light on details/screenshots.
Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
Can we bring those improvements to Mac OS X?
In practice though, Direct3D will usually support the functionality as soon as its available. MS works pretty closely with the 3D graphics hardware companies since good D3D support is in everyone's interests.
See for yourself. Download the Heaven DX11 Benchmark. Run it in DX11 API mode and then OpenGL mode and see the difference. There is a difference, but it's fairly minor. Usually DX11 or OpenGL will be the first to support a new feature, then the other supports it in the next release. The end result is that they normally produce a similar graphics quality.
Does the openGL driver/port have the same graphic detail as the directX version?
OpenGL sits over the top of DirectX on Windows
No, it doesn't. That was the plan when they developed Vista, but it was scrapped after an outcry from half the industry. The OpenGL driver is just as low level as the DirectX driver on Windows.
Er, no, it actually doesn't.
Microsoft had planned to do so in Vista (they actually wanted to run old versions of DirectX on top of DX10, then the newest), but they scrapped that plan well before release after half the game industry, most of the professional graphics industry, and the graphics card companies themselves rose up in arms (Nvidia was actually planning on circumventing it, offering direct OpenGL).
So on any actually-released version of Windows, OpenGL is as low-level as DirectX.
From a user standpoint those huge numbers don't really matter. From a developer standpoint it gives them clues on how efficient their code is. The faster the engine runs the better, and developers can start doing more with it (more features,detail, etc...)
One of the advantages of OpenGL vs DirectX is that it doesn't force the underlying hardware to comply as strictly in areas such as memory management, command batching, shader assembly, etc. This allows implementers more freedom to optimize and usually results in much higher performance. Even if a full backwards compatible OpenGL context is huge.
This approach was proven again very succesful with mobile hardware, where vendors such as Qualcomm, PowerVR or Tegra or ARM (Mali) produce graphics chips that comply with OpenGL but at the same time use the higher level abstaction of the API to their advantage, by supplying very different backends each (Immediate Rendering, Deferred and Tile Based Deferred) as means to improve performance (per watt and silicon space) to levels much higher than the desktop counterparts.
Added to that, programming games under Linux is a joy for those used to it, as the tools are fantastic (command line scripting, gdb with hardware watchpoints, valgrind, strace, etc) and the fact the OS manages the heavy load of games much better. Many companies I worked with, and even big ones such as Naughty Dog (makers of Uncharted) develop their games primarily under Linux, even if the final versions are released for Windows, Mac and Consoles.
This is not true - OpenGL is still a native driver. Microsoft wanted to cripple OpenGL in this way, but the CAD industry pushed back through Khronos and Microsoft agreed to retain native driver access.
Microsoft still hasn't updated the Windows OpenGL library bindings in something like a decade, so OpenGL developers all have to use the extension mechanism to access all of the new features.
Rather then going for broke and getting as much FPS as possible, why don't game developers focus on optimizing the experience for a SOLID 60 FPS, that is, instead of peaking at 300 FPS in one scene, and then dropping to 45 FPS in another, strive for a constant frame rate.
If 60 fps does not tax a rendering system, then focus on MORE content in the scene, such as more particles or physics effects which enhance the gaming experience.
Maybe this is just some raw development figure, but there is absolutely no point in dumping as many frames as possible to a screen which only refreshes a given number of times per second.
I mean if someone came out with a car that outputs 300hp when driving 60 mph, I wouldn't be impressed, so why do I care how many frames are rendered between screen refreshes.
I haven't thought of anything clever to put here, but then again most of you haven't either.
If you haven't noticed, Valve stopped making games a while ago and instead became a content whoring system. One game every 5+ years doesn't make you a game developer IMHO.
I haven't thought of anything clever to put here, but then again most of you haven't either.
% wine Steam.exe
Yeah, look at them all.
Uh, use of linux will surely lead to us running out of a natural resource which cannot be replenished. Frames.
By burning more frames per second we risk our childrens future, those poor bastards will have to view TV on e-ink at this rate.
Very few gamers can even notice a difference between 60-100 let alone over 100.
They will, however, notice the difference when a sudden spike in activity causes the fps to drop to half or a quarter of that. Rendering speeds are highly dependant on what is being rendered.
A game running at 240fps can happily suffer a 75% drop without any noticeable impact, while a game which just barely makes 60 fps will not.
This is actually a mundane sort of thing in cross platform development. Your other "ports" aren't just a money pit. They allow you to stress your code in ways you might not have thought of. Typically the bugs you find in secondary platforms improve your product on it's primary platform.
A Pirate and a Puritan look the same on a balance sheet.
Render rates far above 60fps means that I don't have to treat my machine like an xbox just because I decide to do some gaming with it.
It also means that I can likely get away with a much less powerful system and GPU and still have acceptable performance.
I can use less machine to get the job done.
A Pirate and a Puritan look the same on a balance sheet.
So I don't know why anyone should be surprised at this, Linux has always been OpenGL, Windows DirectX, so having Linux do OpenGL better isn't surprising, anymore than Windows doing DirectX, its just what the platform is made for is all.
As a counterpoint, TFA said that their OpenGL port of L4D2 on Windows ran faster than the DirectX version.
That's a great game. When did Valve release it?
CRTs can do 250+Hz, but good luck finding one these days outside of a flea market.
Does the openGL driver/port have the same graphic detail as the directX version?
You think they don't know how to benchmark their own game?
No sig today...
I've noticed the different in speed of OpenGL versus DirectX in the past when the first versions of Google Earth came out. You could choose between OpenGL and DX to run the program. OpenGL was very smooth whereas DX's FPS could be counted on your fingers.
It'd be highly amusing to me if, in a few years time, Windows users are keeping a copy of Linux around because "I need it for the games" :)
So.. it has come to this
Clearly not. They give a bare number that doesn't indicate whether it is a maximum FPS or an average FPS. They provide neither the test setup (screen resolution, detail settings, etc), nor meaningful analysis of overall performance. For example, if the average FPS is lower on one platform, but the variability is also lower, the actual user-perceived performance will be better. No meaningful details are provided, just some ePeen number which is abstract of context. The statistician in me weeps.
Its what blizzard did, of course I no longer consider them a game developer after diablo 3.
I'm not familiar with that game; did you mean Auction House Tycoon?
That only shows that they fail at communicating the results. Not that the result itself is bogus...
I was wondering why the difficulty level increased with each version.
How can I believe you when you tell me what I don't want to hear?
The test setup is provided on their blog: http://blogs.valvesoftware.com/linux/
Oh derp, you were referring to the options. And the blog was linked in TFA. Guess I'm the idiot.
Was it a laptop?
I found that often where the windows driver hadn't been updated in awhile, the Linux driver was actually more fully featured at the time.
My old HP laptop ran some games (I believe it was Battlefield 2) that wouldn't work at all in windows due to driver issues.
It's not "clear" at all. Just because they didn't provide such details doesn't mean they don't exist. Absence of evidence is not evidence of absence.
Valve is an exceptionally competent developer of high performance, low-level graphics software. The article says "The data is generated from an internal test case". It's reasonable to assume this internal test case is specifically designed for, oh I dunno, TESTING. Which means it's designed to put the different rendering pipelines through the exact same gauntlet (or as close as can be managed).
Why would you think that them running the test at inconsistent resolution/detail settings is even a remote possibility? Do such obvious test practices REALLY need to be spelled out for you?
Yes, they reduced the test data to a simple number (I thought it was pretty obvious this represented "average" FPS). It's an easier discussion point. What of it? It's a blog post, not a scientific paper.
"Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
It isn't surprising for anyone who knows DX and OpenGL well, but it is surprising for game developers and other graphic intensive users since the "everybody knows" that graphics on Linux sucks.
But... the future refused to change.
Hardware OpenGL has always been faster than DirectX (there were a lot of companies and talented engineers pooling ideas for OpenGL, plus it has been around a while and worked out a lo of kinks). This shouldn't be a surprise. There was a hiatus where DirectX was ahead on features (we'll ignore the OpenGL extensions, and consider Core only). Now OpenGL has feature parity wih DirectX and works on a lot more platforms (which you could take as OpenGL actually having more features) - including OpenGL's superior support for Windows XP.
Yes, it's mentioned in one of the replies in the comments.
Mada mada dane.
Again this is surprising...why exactly? Valve has ALWAYS been more OpenGL focused, going back to HL1 where you would get better visuals and framerate if you chose OpenGL over D3D so why is it surprising that a game made by them runs better on OpenGL than DirectX?
This is like saying "Sony games run better on the PS3 than the PC" which of course would get a bug DUH! from everyone because it should be obvious, same here. Valve and ID have always been more OpenGL than DirectX, been that way since the beginning, doubt its gonna change barring OpenGL going the way of Glide. I'm sure the Valve guys know OpenGL like the back of their hands, know all the tricks to squeeze performance out of it, so not a shock when that is what we see in the FPS.
ACs don't waste your time replying, your posts are never seen by me.
When you have TONS of explosions going off, TONS of lighting effects, you want the MINIMUM frame rate to stay ABOVE 60.
BY targeting such a high frame you have a nice SAFETY MARGIN for when the engine needs to start rendering additional (special) effects.
No offense, but you're an idiot.
Go play some BF:BC2 or BF3 on High Quality until you learn why 60+ fps is important.
I know I am going to come off as a 'shill' but MS tools rock (I am not talking about their frameworks). It is the one thing that holds me to windows these days. All those tools you mention are available in windows and usually better polished. Valgrind compaired to say using boundschecker. You goto valgrind and bisect issues, boundschecker puts you right on the offending line that they think either overwrote memory or leaked. .
You're going to come off as an MS shill because you are flat out lying. Valgrind tells you exactly what line is offending.
char *p = malloc(8);
p[10] = 42;
Let valgrind run that code and it will immediately tell you that the source filename and linenumber that p[10]=42; is on along with a callstack backtrace. Ditto with leaked memory, reads of uninitialized memory etc.