informa
3 min read
article

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

Disbelief

Chicago, Illinois
05.10.22
Producer

Build a Rocket Boy Games

Edinburgh, Scotland
05.12.22
Lead Animation Programmer

Windwalk Games

Austin, Texas
05.16.22
Game Designer

Sucker Punch Productions

Bellevue, Washington
05.10.22
Campaign Director
More Jobs   

CONNECT WITH US

Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter

@gamedevdotcom

Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Register
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

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