1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Faster Zombies!

Discussion in 'General Software' started by Melvis, Aug 18, 2013.

  1. Melvis

    Melvis

    Joined:
    Mar 18, 2008
    Messages:
    3,594 (1.45/day)
    Thanks Received:
    531
    Location:
    Australia
    Not sure if this has been posted before but I thought Id post it anyway. Enjoy :)

    Fast Zombies

    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.
    As any software developer can tell you, performance is a complicated issue. In the interests of simplicity, we’ll concern ourselves with the following high-end configuration:

    Hardware


    Intel Core i7 3930k
    NVIDIA GeForce GTX 680
    32 GB RAM

    Software

    Windows 7 Service Pack 1 64-bit
    Left 4 Dead 2
    Ubuntu 12.04 32-bit

    We are using a 32-bit version of Linux temporarily and will run on 64-bit Linux later.
    Running Left 4 Dead 2 on Windows 7 with Direct3D drivers, we get 270.6 FPS as a baseline. The data is generated from an internal test case.

    When we started with Linux, the initial version we got up and running was at 6 FPS. This is typical of an initial successful port to a new platform.
    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

    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.
    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.
    OpenGL versus Direct3D on Windows 7

    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.
    Working with hardware vendors

    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.
    This is a great example of the benefits that are the result of close coordination between software and hardware developers and should provide value to the Linux community at large.

    Source: http://blogs.valvesoftware.com/linux/faster-zombies/
     
  2. Melvis

    Melvis

    Joined:
    Mar 18, 2008
    Messages:
    3,594 (1.45/day)
    Thanks Received:
    531
    Location:
    Australia
    Now we just need more games on Linux!! So we can all get rid of Microshaft.
     
  3. N-Gen

    N-Gen

    Joined:
    Oct 28, 2007
    Messages:
    643 (0.25/day)
    Thanks Received:
    156
    Good to see some developers give their time to research like this, and actually, it's quite interesting.
     
  4. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    14,123 (6.23/day)
    Thanks Received:
    3,939
    Location:
    IA, USA
    DirectX (and by extension, "Microshaft") is largely the reason why gaming on computers hasn't given in to gaming on consoles. Long story short, DirectX keeps game developers sane and allows computer hardware to remain flexible. This flexibility is also why they saw lower FPS on Direct3D (315 versus 303.4).
     
    okidna and Dent1 say thanks.
    Crunching for Team TPU
  5. Melvis

    Melvis

    Joined:
    Mar 18, 2008
    Messages:
    3,594 (1.45/day)
    Thanks Received:
    531
    Location:
    Australia
    Yea I have heard its a lot harder to code for openCL. But its interesting to see how much better games can run on linux compared to Windows I think.
     
  6. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    14,123 (6.23/day)
    Thanks Received:
    3,939
    Location:
    IA, USA
    Only if the developer puts fourth the effort to make it so. Most don't.
     
    Crunching for Team TPU
  7. Melvis

    Melvis

    Joined:
    Mar 18, 2008
    Messages:
    3,594 (1.45/day)
    Thanks Received:
    531
    Location:
    Australia
    Yea to true, but it will grow in years to come, just slowly id say. Only time will tell.
     

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page