Valve hits Left 4 Dead 2 performance high - on Linux

August 2, 2012 // 9:31 a.m.

Tags: #amd #direct3d #directx #intel #kernel #left-4-dead-2 #nvidia #opengl #source #source-engine #steam-for-linux #valve #valve-linux

Valve has released more information regarding its efforts to port zombie-killing shooter Left 4 Dead 2 and its Steam digital distribution platform to Linux - including the interesting fact that performance is better than under Windows.

Comparing the 32-bit build of Ubuntu Linux 12.04 to the Windows 7 Service Pack 1 64-bit release, both running on a Core i7 3930K with an Nvidia GeForce GTX 680 and 32GB of RAM, the results were initially slightly disappointing: where the DirectX-powered Windows version of Left 4 Dead 2 managed an average of 270.6 frames per second, the OpenGL-powered Linux version managed just six frames per second.

'This is typical of an initial successful port to a new platform,' the team explained in a blog post on the matter, stating that work then began on modifying the game to work better with OpenGL, the Linux kernel, and tweaking the graphics driver to help boost performance still further.

As a result of changes made to the Source engine - including reducing overheads in calling OpenGL and switching to a Linux-friendly small-block heap memory allocation system - the performance rose significantly. Following the conclusion of testing, the Linux version of Left 4 Dead 2 was running at 315FPS compared to 270.6FPS on Windows.

'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,' the team explained. '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.'

The improved performance for the OpenGL-based run compared to the DirectX-based run, the team claimed, is the result of a previously unnoticed overhead in Direct3D which adds a few microseconds to each batch. Although small, these delays soon add up - which explains the differing performance between the DirectX and OpenGL versions 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,' the team added.

Finally, the Valve Linux team explained that they have been working closely with Nvidia, AMD and Intel to boost graphics performance for their respective hardware under Linux. 'They have all been great to work with,' the team claimed - Torvalds' experiences to the contrary - 'and have been very committed to having engineers on-site working with our engineers, carefully analysing 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.'

With Valve proving that gaming on Linux can equal or better the Windows experience, more developers are likely to follow suit and pile in on the Steam for Linux launch.

WEEK IN REVIEW

TOP STORIES

SUGGESTED FOR YOU