Slashdot Mirror


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

49 of 274 comments (clear)

  1. Year of... by Anonymous Coward · · Score: 5, Funny

    LINUX DESKTOP

    1. Re:Year of... by Yvan256 · · Score: 3, Funny

      Linux Desktop? Nope. Desktops are dying anyway, almost everyone has moved to laptops.

      Year of the Linux game console, perhaps?

    2. Re:Year of... by Deorus · · Score: 5, Interesting

      Linux Desktop? Nope. Desktops are dying anyway, almost everyone has moved to laptops.

      This is unfortunate. Ever since I became a nomad (and switched to Apple) that I miss actually shopping for desktop hardware. Every time I enter a retail store and look at the high-end video cards I really really want to build a desktop, but it can't fit my luggage... The desktop PC is far from being dead and I am already missing it, I think it's gonna be one of those things that I will remember from early 21st century just like I miss tinkering with analog electronics in the 80s (no, I'm not old, I was born in that decade).

      Year of the Linux game console, perhaps?

      Rumor has it that Valve is building a console with PC hardware, so I wouldn't rule out that possibility. They feel that the Windows and Mac App Stores represent a threat to Steam as a third party, so this may be part of their strategy to build a platform of their own. Blizzard has expressed similar feelings, which makes sense if we consider the rumor that they had and probably still have a third party service like Steam planned for battle.net (at least according to the leaked schedules which have been quite accurate, though battle.net third parties is overdue at this point).

    3. Re:Year of... by Ratchet · · Score: 5, Interesting

      I think they aren't so much building a game console as they are building a spec for a Linux based gaming PC for everyone to get behind. That makes more sense to me. I, quite literally, only use Windows to play games. Every thing else I either do on my phone, tablet, or already just as easily could do under Linux. If they can make it easy for us hardcore gamers to transition to Linux, then I doubt any of us would bother with Windows again.

      The only issue is support for all this cutting edge hardware I have. Linux is always a problem there, but if gamers start to flock, I hope so too will the companies that make our gaming hardware.

    4. Re:Year of... by _Shad0w_ · · Score: 5, Informative

      Valve projects run on the basis of "work on what you think brings value to our customers and to the company", so someone would have to have decided "I think a Linux port is a good idea, so I will start working on one" and encouraged other people to join the project. All of their desks are on wheels, so people working on stuff can move their desks together - they just unplug from where they are and plug in where they go.

      Valve has a flattened hierarchy, there are no managers. Team leaders aren't appointed, they just happen because the naturally turn out to be the team leader. Remuneration is based on perceived worth by your peers. Their employee handbook is an interesting read - the PDF of it was publicly available, last time I checked.

      --

      Yeah, I had a sig once; I got bored of it.

    5. Re:Year of... by hairyfeet · · Score: 5, Interesting

      Yeah ya know, every time I hear someone say "Oh Gabe is doing this because the Windows appstore is a threat" I just have to ask...has Gabe never TRIED GFWL? Its fucking horrible! The damned thing can't even show you WINDOWS games when you are on Games for WINDOWS Live, nope those are at the bottom of the page under a dozen Xbox games! Its crash prone, slow as hell to log in, matchmaking sucks hairy balls, its a total POS!

      The only "threat" the MS Appstore holds to Valve is the Cut The Rope, Angry Birds type of "gamers" that frankly wouldn't know WTF Steam was or that they even HAD those popcap style games in the first place! Mark my words, a year and a half from now old Gabe will still be laughing all the way to the bank while the MS Appstore will be added to Zune Market and GFWL in the "WTF were they thinking?" list.

      If ya ask me I'd say its pretty fricking obvious what old Gabe is doing...he is thinking "Steambox" with COTS parts similar to XBox 1 and a stripped down Linux with Steam for all the apps. Makes sense, have a combo game/media center where the console devs can sell to PC and console users with a single port, the only catch I see is getting the blood sucking publishers like EA and Activision to go along. Lets face it, those corps never met a customer they didn't want to assrape and the second they see its for the living room they are gonna be rubbing their hands together and thinking about how hard they are gonna hit that wallet. One of the big selling points of Steam is how many good games you can buy there cheap, its literally "push button to get game" with prices lower than going out for pizza.

      Personally I hope he pulls it off, I'd love a console where I can play my Steam games and just log into my account to have all my PC games right there to play with the boys, but i bet other than valve games the other publishers will screw the whole thing with their greed. Hey Valve, if you wanna do the whole Steambox, know what would be a GREAT launch title? How about Episode 3 huh? Just make sure we PC gamers can have it too okay?

      --
      ACs don't waste your time replying, your posts are never seen by me.
    6. Re:Year of... by Orga · · Score: 4, Insightful

      " Desktops are dying anyway, almost everyone has moved to laptops."

      as a gamer I went this route.. once.. bought a pricey gaming laptop... too hot, always had to change thermal paste, didn't keep up well with the games. I gave up and built out a new desktop.

      As long as thermal issues remain in computing and vendors refuse to standardize and allow upgrading of laptop components desktops sized computing will not die.

    7. Re:Year of... by PerfectionLost · · Score: 3

      Games are the only reason I use Windows at home.

    8. Re:Year of... by KhabaLox · · Score: 5, Funny

      My Debian brings all the beards to the yard
      And they're like, it's better than yours
      Damn right it's better than yours
      I could fork it and I wouldn't even charge

      --
      Ceci n'est pas un sig.
  2. Re:What does it tell you? by FTWinston · · Score: 5, Interesting

    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.

  3. Interesting bit from the article by gman003 · · Score: 5, Informative

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

    1. Re:Interesting bit from the article by kav2k · · Score: 5, Interesting

      What I find really interesting is the fact that this port spurred impovements in proprietary OpenGL drivers, in close collaboration with manufacturers.

      This push by Valve may benefit everyone, even people who never will use Steam.

    2. Re:Interesting bit from the article by Ynot_82 · · Score: 4, Interesting

      I'm sure lots more details are coming.

      Valve are doing a big presentation on their Linux adventures next week at SIGGRAPH (6th - 9th Aug)

    3. Re:Interesting bit from the article by poetmatt · · Score: 5, Informative

      Let's be careful with statements, please. They didn't say it ran slow due to the kernel or OpenGL, that is BS. They are acknowledging their own errors, not OpenGL's and not the kernels. They also did say exactly what they did to fix the situation.

      I'll spare you on your details with the reality of what they said:

      Their goals:
      Performance improvements fall into several categories:
      Modifying our game to work better with the kernel
      Modifying our game to work better with OpenGL
      Optimizing the graphics driver

      The results:
      An example of the first category would be changing our memory allocator to use more appropriate Linux functions. This was achieved by implementing the Source engine small block heap to work under Linux. The second category would include reducing overhead in calling OpenGL, and extending our renderer with new interfaces for better encapsulation of OpenGL and 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. That's not a valve benefit, that's "all linux games" benefit.

    4. Re:Interesting bit from the article by adisakp · · Score: 5, Informative

      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.

      That happens on nearly every Engine port. For example - Mortal Kombat on the Playstation VITA Handheld Console.

      I worked on the team porting Unreal from PS3 / XBOX 360 to PS Vita at Netherrealm Studios (which we did in house separate from Epic's efforts). We ported over a NULL driver and then got the basic graphics up and running. Our initial port ran at 6 FPS. The shipped game ran at 60FPS with frame syncing and 80-90FPS at Speed-of-Light (frame syncing off).

      You write a lot of code quickly to just get things working and once they are, you figure out the bottle necks and optimize code and assets from there.

    5. Re:Interesting bit from the article by gman003 · · Score: 3, Interesting

      Sorry, I sort of glossed over that distinction.

      The problem is in how the code works with the kernel (or GL driver). That can be fixed either by reworking how the code calls it, or reworking how the kernel (or driver) works internally. I referred to this, ambiguously, as "problems with the kernel", not "problems working with the kernel".

      As far as kernel stuff, they seem to have done it entirely on their side. I imagine most of it was memory allocation - Linux's malloc() has much different performance characteristics than Window's malloc(), and that's 90% of your kernel calls right there.

      The GL stuff they fixed in both places. In some, they were using it in a sub-optimal way. Sometimes they had to work with the driver team to get it fixed in the driver.

    6. Re:Interesting bit from the article by Anonymous Coward · · Score: 3, Informative

      Wrong, he said they only worked with Intel specifically on OSS drivers. They've been working with ATI and nVIDIA on PROPRIETARY drivers very much, and have made that very clear.

  4. Efficiency by defender.tx · · Score: 3, Interesting

    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!

    1. Re:Efficiency by Urza9814 · · Score: 4, Interesting

      Yea, I noticed several years ago, back when I used to play WoW and my computer could barely handle, that it would run faster in Linux on Wine with OpenGL than it would on Windows XP. I mean I'm talking ~5fps on windows to ~15fps with better graphics on Linux -- not really playable on Windows, barely playable on Linux.

    2. Re:Efficiency by gman003 · · Score: 5, Insightful

      They weren't expecting it to run more efficiently *given the level of work they invested*. They've sunk years of work into making the Windows version run quickly. Getting a Linux port to run faster, only months after getting their initial port running (the first running Linux version ran at 6 fps under the same test), is impressive.

    3. Re:Efficiency by Xest · · Score: 4, Insightful

      You may well be right, I'd be cautious in taking anything away from this particular article though, as Valve have made it quite clear now that they have a vested interest in seeing Windows fall as they see Windows 8 as a genuine threat to their existence if people start buying games directly from the Windows Marketplace rather than Steam. When they referring to Windows 8 as a general "Catastrophe" which is probably a bit of a stretch, even if it maybe is for them, then it's hard to see them as objective on this issue.

      Not that this is likely to be an unpopular move here, nor is it necessarily a bad thing if a company like Valve is helping Windows fall a peg or two, but now Valve has a clear political motivation to attacking windows, it's hard to see anything anti-Windows they mention as necessarily objective. It's also quite possible that Valve's Windows engine actually just isn't well optimised, and that now that they're moving it to another platform it's given them chance to rewrite components that were long overdue for a rewrite. I believe at least some of the foundations and design of the Source engine actually stem all the way back to the Quake 1 codebase for example.

    4. Re:Efficiency by gman003 · · Score: 5, Informative

      Much of the engine design dates back to the Quake 2 engine, but none of the code does.

      History time!

      First came Quake, which was coded completely from scratch. Then came Quake ][, which was a significant overhaul and massive rewrite. Some of the code was saved, but the engine design itself was changed quite a bit. Both of those engines were written by id Software.

      Valve licensed the Quake ][ engine, and improved on it, adding a new renderer (a DirectX one, IIRC, but they kept the OpenGL and software renderers) and several other nice features. They used this for Half-Life, Team Fortress Classic, Counter-Strike 1.6, etc., and also offered it for relicensing under the name GoldSrc.

      Over the years and years it took to make Half-Life 2, they rewrote literally the entire engine. Not a single line of code remains from Quake ][. They rewrote the renderer (several times), added all kinds of animation goodies, integrated Havok physics, and so on. But they kept the same basic client/local server/server design, the same general layout. It's much like how GNU made the basic Linux toolset - they copied the design of UNIX, but did not use any code from it.

      Valve has continued to use and upgrade this engine, calling it Source to confuse everyone. They've offered it for license, and at one point were seen as a decent competitor, but they've really fallen behind in the post-UnrealEngine 3 world. I half-suspect they'll be either doing a total engine redesign, or giving up and licensing someone else's engine.

    5. Re:Efficiency by Krneki · · Score: 3, Insightful

      I tried it too and it was faster on Linux, but .....most of the graphic effects were missing, so this might be the reason.

      --
      Love many, trust a few, do harm to none.
  5. Re:What about quality? by nschubach · · Score: 3, Informative

    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.
  6. Great by Yvan256 · · Score: 4, Funny

    Can we bring those improvements to Mac OS X?

    1. Re:Great by Ignacio · · Score: 5, Interesting

      Windows loves developers, OS X hates developers, Linux IS developers.

  7. Re:What about quality? by defender.tx · · Score: 5, Interesting

    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.

  8. Re:What does it tell you? by synapse7 · · Score: 4, Interesting

    Does the openGL driver/port have the same graphic detail as the directX version?

  9. Re:What does it tell you? by Anonymous Coward · · Score: 5, Informative

    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.

  10. Re:What does it tell you? by gman003 · · Score: 5, Insightful

    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.

  11. Re:Ehhhhhh. by bmd256 · · Score: 3, Informative

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

  12. We developers knew this for a long time.. by goruka · · Score: 5, Informative

    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.

  13. Re:Valve is big on Linux by Minwee · · Score: 4, Funny

    % wine Steam.exe

    Yeah, look at them all.

  14. Re:Conserve Energy! by PremiumCarrion · · Score: 3, Funny

    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.

  15. Re:Ehhhhhh. by Minwee · · Score: 4, Insightful

    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.

  16. Re:What does it tell you? by jedidiah · · Score: 4, Insightful

    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.
  17. Re:Whats the point of 300+ FPS by gman003 · · Score: 5, Insightful

    This was 300fps on an *extremely* powerful system. The GeForce 680 is the most powerful single-GPU card on the market, and the 3930K is one of Intel's top consumer chips. I myself have a 660 and a 3610, weaker versions of the ones they used, and I can max out every game I have.

    Getting 300fps on that means that, on a system a tenth as powerful, you get 30fps without dropping the graphics settings. Valve just doesn't chase the extreme high-end hardware - they don't bother adding more particles and such that make it look better only on a fraction of a percent of systems. Valve has perhaps the best knowledge of what real-world users are gaming on, thanks to the Steam Hardware Survey. So they can make an informed decision as to whether it is worth it to have the artists come in and add yet another layer of detail that will only be seen on the newest and most expensive computers.

    That said, 120hz monitors seem to be rising in popularity, making rendering at 120fps a worthwhile goal. And it's often good to have a buffer of 10-20fps or so, because the amount of stuff you have to render isn't constant. In combat (with all the particle effects, explosions, flying debris, etc.), it often drops by 10%-20%, which can put you below 60fps if you're running at 70-80 normally.

  18. Re:Ehhhhhh. by jedidiah · · Score: 4, Insightful

    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.
  19. Re:What does it tell you? by Ignacio · · Score: 4, Insightful

    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.

  20. Re:Valve is big on Linux by Minwee · · Score: 4, Funny

    That's a great game. When did Valve release it?

  21. Re:What does it tell you? by Joce640k · · Score: 3, Funny

    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...
  22. Irony by oneandoneis2 · · Score: 5, Funny

    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
  23. Re:What does it tell you? by Tawnos · · Score: 4, Insightful

    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.

  24. Re:Episode 3 by demonbug · · Score: 4, Funny

    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?

  25. Re:What does it tell you? by BlackThorne_DK · · Score: 4, Insightful

    That only shows that they fail at communicating the results. Not that the result itself is bogus...

  26. Re:Valve is big on Linux by pushing-robot · · Score: 4, Funny

    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?
  27. Re:What does it tell you? by twocows · · Score: 4, Informative

    The test setup is provided on their blog: http://blogs.valvesoftware.com/linux/

  28. Re:What does it tell you? by twocows · · Score: 4, Insightful

    Oh derp, you were referring to the options. And the blog was linked in TFA. Guess I'm the idiot.

  29. Re:What does it tell you? by Wraithlyn · · Score: 4, Insightful

    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