Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Games Linux

Valve Shares Performance Numbers On Port of Left4Dead 274

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!"
This discussion has been archived. No new comments can be posted.

Valve Shares Performance Numbers On Port of Left4Dead

Comments Filter:
  • Year of... (Score:5, Funny)

    by Anonymous Coward on Thursday August 02, 2012 @09:51AM (#40855395)

    LINUX DESKTOP

    • by Yvan256 ( 722131 ) on Thursday August 02, 2012 @10:00AM (#40855491) Homepage Journal

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

      Year of the Linux game console, perhaps?

      • Re:Year of... (Score:5, Interesting)

        by Deorus ( 811828 ) on Thursday August 02, 2012 @10:18AM (#40855729)

        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 [techcrunch.com] which have been quite accurate, though battle.net third parties is overdue at this point).

        • Re:Year of... (Score:5, Interesting)

          by Ratchet ( 79516 ) on Thursday August 02, 2012 @10:48AM (#40856113) Homepage

          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.

          • by PerfectionLost ( 1004287 ) <ben@noSPaM.perfectresolution.com> on Thursday August 02, 2012 @11:48AM (#40856871)

            Games are the only reason I use Windows at home.

            • by morari ( 1080535 )

              I love Linux. I've had some distribution or another set a second partition since the late 90s. It's great for basic usage and applications. Your average user will miss out on nothing by switching to Linux. But for me, it's not something I can use full time, try as I might. Games are a big part of it, but there are other things as well.

              I'd say that the lack of Adobe's Creative Suite is a huge sticking point for me. I use just about every one of those programs on a near daily basis. It might work well enough

        • Comment removed (Score:5, Interesting)

          by account_deleted ( 4530225 ) on Thursday August 02, 2012 @11:24AM (#40856557)
          Comment removed based on user account deletion
          • 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!

            Just an FYI, Popcap themselves were actually one of the first third-parties to sell on Steam. I remember when early versions of Steam listed every free game on Steam in your library. At the time, that was what, Lost Coast and Codename: Freeman?

            Then Popcap came in, and had demos for roughly ten million games[citation needed]. It rather irritated gamers, having to scroll through so many games they don't actually have or care for. They fixed that in a patch a few weeks later.

            There are a lot of other "casual" g

      • There is a difference between your computer's desktop and a desktop computer.
        Reports of the Linux Desktop's death have been greatly exaggerated.

      • Linux is bringing the desktop back! MATE, the savior of the desktop.
      • Re:Year of... (Score:5, Insightful)

        by Orga ( 1720130 ) on Thursday August 02, 2012 @11:26AM (#40856585)

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

  • by gman003 ( 1693318 ) on Thursday August 02, 2012 @09:53AM (#40855425)

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

    • by kav2k ( 1545689 ) on Thursday August 02, 2012 @10:09AM (#40855595)

      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.

    • The article gives about as much detail as you need really. The heap stuff sounds familiar, I think they mentioned that they were going to optimise it pretty early on. It is nice that they've achieved such speed gains though, especially on the driver side.

      • I would have liked much more detail. What shaders were the most problematic to optimize? What sections of the code perform differently (the netcode? the AI? the animation?)

        Valve normally goes into a lot more detail. I remember their TF2 art presentation going on and on about shader algorithms - lots of equations, and pictures showing the effect of each term.

    • by poetmatt ( 793785 ) on Thursday August 02, 2012 @11:03AM (#40856313) Journal

      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.

      • by gman003 ( 1693318 ) on Thursday August 02, 2012 @11:16AM (#40856479)

        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.

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

          *twitch* malloc() is not a kernel call, its a library function only. man 2 brk.

    • by adisakp ( 705706 ) on Thursday August 02, 2012 @11:06AM (#40856343) Journal

      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.

      • by adisakp ( 705706 )
        Although in this case, I'm sure a number of the bottle necks were in the system and drivers which Valve apparently worked with hardware manufacturers to fix. That's a good thing for everyone.
  • Efficiency (Score:3, Interesting)

    by defender.tx ( 2699199 ) on Thursday August 02, 2012 @09:54AM (#40855441)
    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!
    • Re:Efficiency (Score:5, Interesting)

      by Urza9814 ( 883915 ) on Thursday August 02, 2012 @10:00AM (#40855493)

      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.

    • Re:Efficiency (Score:5, Insightful)

      by Xest ( 935314 ) on Thursday August 02, 2012 @10:14AM (#40855683)

      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.

      • Re:Efficiency (Score:5, Informative)

        by gman003 ( 1693318 ) on Thursday August 02, 2012 @10:33AM (#40855933)

        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.

        • by IpSo_ ( 21711 )

          I highly doubt they will license another engine given their recent Source Filmmaker [sourcefilmmaker.com] work. Thats an impressive piece of technology and I have a hard time seeing them let it all go to waste.

    • This has always been true in my experience. Quite a few Windows games running under Cedega were faster for me in Linux than on Windows with the same hardware. Native ports are an even bigger improvement; I found everything from NWN to Quake3Arena much faster on Linux than on Windows.

  • Great (Score:5, Funny)

    by Yvan256 ( 722131 ) on Thursday August 02, 2012 @10:04AM (#40855537) Homepage Journal

    Can we bring those improvements to Mac OS X?

  • by goruka ( 1721094 ) on Thursday August 02, 2012 @10:24AM (#40855831)
    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.
  • by TheSkepticalOptimist ( 898384 ) on Thursday August 02, 2012 @10:33AM (#40855935)

    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.

    • by gman003 ( 1693318 ) on Thursday August 02, 2012 @11:00AM (#40856271)

      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.

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

  • Irony (Score:5, Funny)

    by oneandoneis2 ( 777721 ) on Thursday August 02, 2012 @11:38AM (#40856737) Homepage

    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" :)

THEGODDESSOFTHENETHASTWISTINGFINGERSANDHERVOICEISLIKEAJAVELININTHENIGHTDUDE

Working...