informa
/
2 MIN READ
News

Nordic: Intel's Davies On Multi-Threading Strategies

In his Practical Multi-Threading for Game Performance lecture, Intel application engineer Leigh Davies stressed the growing importance of properly threading, highlighting specific considerations and strategies and case studies for games such as Crysis<
In his Practical Multi-Threading for Game Performance lecture, Intel application engineer Leigh Davies stressed the growing importance of properly threading, highlighting specific considerations and strategies and case studies for games such as Crysis. To start, Davies highlighted a number of considerations for multithreading in games: Is framerate the most important performance indicator? Is input latency a dealbreaker? Is it "fair," in a gameplay sense, for clients to run at different speeds? Is it more important to have high framerate or smooth framerate? How well will the threaded app scale on 'n' cores? Finally, he noted the considerations of concurrency (Amdahl's Law) and bottlenecks. He then noted a number of threading strategies, such as data forking, in which developers distribute CPU-intensive tasks over multiple threads, gather calculation results and then synchronize. Another strategy is the pipeline - thread game processes separately, such as rendering and game logic, and sync after each frame, which, notably, adds latency. Next is the consumer approach - thread game processes separately but asynchronously, free up threads when the process is done, and set all game processes at same frame rate. Finally there's the work crew - thread game processes separately and asynchronously, but at varying frame rates, which in the end is difficult to schedule. Most threaded games, said Davies, use a combination of these methods. Graphics drivers can get on a dedicated thread, he said, but avoid calls returning GPU state information, something that's less of a constraint under DX10, limiting system memory vertex buffers, locking using D3Dlock_discard or D3Dlock_nooverwrite. It's also important to group resources once per frame, said Davies, adding that driver queries are OK, as they're asynchronous. Davies then gave some examples of how current games are threading, such as Crysis, which is threading graphics drivers through a GPU, a proprietary physics system, a particle engine, and the game's audio. Ghost Recon 2, he said, is threading its rendering through GPU, and its physics through an Ageia PhysX card. For Massive Entertainment's World In Conflict, the studio created an internal benchmarking application using game assets, said Davies, using it for marketing demos, comparing hardware performance across multiple configurations, and compatibility testing. It's important in doing this, though, that the game system and the benchmarking application have roughly the same system load balance as the final game. Finally, said Davies, developers need to understand how Windows dynamically assigns threads. Be careful, he warned, when manually setting thread affinity, as Windows may also assign a non-game process, such as a virus check, to that core and slow the game down.

Latest Jobs

IO Interactive

Hybrid (Malmö, Sweden)
3.02.23
Gameplay Director (Project Fantasy)

Arizona State University

Los Angeles, CA, USA
2.27.23
Assistant Professor of XR Technologies

IO Interactive

Hybrid (Copenhagen, Denmark)
3.02.23
Animation Tech Programmer

Purdue University

West Lafayette, IN, USA
3.02.23
Assistant Professor in Game Design and Development
More Jobs   

CONNECT WITH US

Explore the
Advertise with
Follow us

Game Developer Job Board

Game Developer

@gamedevdotcom

Explore the

Game Developer Job Board

Browse open positions across the game industry or recruit new talent for your studio

Browse
Advertise with

Game Developer

Engage game professionals and drive sales using an array of Game Developer media solutions to meet your objectives.

Learn More
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more