Game Design, Programming and running a one-man games business…

Maxxing out the PC

When you are running a new PC game, what percentage of your PC is actually working to produce the experience?

Obviously it depends massively on the game, the specs of your PC, your monitor resolution and other factors, but even in extreme cases I suspect it is pitifully small.

The most obvious under utilisation is the CPU. Most games still run in 1 thread, maybe 2 or 3 if there is some sound streaming, possibly more if they are ambitiously attempting multithreaded streaming in of textured data, and maybe a few more for online play. I don’t think that there are many games that will happily place 8 different threads on the 8 cores of my machine (quad core, but hyperthreaded, so showing up as 8). I can max out the CPU by rendering in a 3d package, or by compiling in visual studio, but I’ve yet to see a game manage it. I can understand why, mutlithreaded code is a bitch.

(One problem is, we don’t have exclusive access to all those cores anyway. Right now, this laptop has 53 processes running 715 threads. There are 17,000 handles open (mostly files, one assumes). All I’m doing is typing in firefox)

The second missed opportunity is hard disk access. Go to windows task manager, performance, then check out the resource monitor. Check out all that disk access. Who is doing that? and what for? You can bet that even during a gaming session, a dozen other apps and ‘services’ will be spamming your disk drive.

Of course the same goes for memory, and access to peripherals, the network yada yada.

It makes you wonder just how jaw droppingly awesome a PC game could be if it didn’t have all that nonsense going on all the time. Imagine a special ‘gamer’ mode of windows 8/9 that effectively locked out all those other services, clawed back all the RAM and the cpu cycles, and let your game have console style complete control.

A pipe dream, of course, because of backwards compatibility and a million other reasons, but I do find myself wondering what percentage of my PC is actually needed to play Battlefield:Bad Company 2.  Is it 5%? 7%? certainly not much more?


5 thoughts on Maxxing out the PC

  1. What a coincidence that you write this article almost as soon as I started following your blog!

    A couple of friends and I have been talking about something like this for a long time, except in our version it’s a seperate operating system that you would boot into at startup (kind of like dual booting windows and linux) with some simple name like “GameOS”. All the OS would be is a simple command line, Where you just type in the name of the game and it starts, so the ONLY thing using your computer, is the game, kind of like a console, but WAY more powerful!

    Obviously we haven’t hashed out all the ideas, but I personally think something like that would be awesome.

  2. DragonAge uses 5/8 cores on my machine. Crysis uses 1 heavily + 3 partially. WoW uses 1.

    Expect big games to be more multithreaded. Thank the PS3 for better use of multiple cores, you can’t get the bulk of the power out of the PS3 without using multithreading.

    Libraries to make use of multiple threads easily now exist. There is certainly some heavy lifting to do with multithreading, and everyone loves a good race condition bug from time to time, but a good thread pool library is ridiculously easy to use.

    My current game uses a thread pool with compute task scheduling, however so far the only tool that takes real advantage of that is my terrain importer (It uses all 8 threads and brought the run time down from 4+ hours to about 2 minutes.) I’m planning to add disk I/O tasks to the library to use for background loading since most disk I/O is about waiting for the O/S anyway – no sense blocking the main thread for that.

    Disks aren’t fast enough yet. I have some textures that take about 2 seconds to load, so real-time file loading is still too slow.

  3. Civ 4 + 5 is the worst game for this, just runs single threaded in a very obvious way.

    Lots of other newer games I play seem to utilise all 4 of my cores properly (not just 25% each i.e. single threaded, but max all 4 when needed).

    The mode you’re talking about is called a ‘games console’, and it turns out that standardisation leads to mediocrity. I prefer my PC, warts and all. I like being able to alt-tab (yay DX10+ alt tab changes!) out and talk on gtalk, or browse the webs.

    I do wish programmers would be less lazy about the hard drive. So often things are written to disk needlessly, just because it’s convenient. No… no you don’t need to re-autopopulate those configuration files right now, no you don’t need to write your sqllite database back to disk now.. etc.

  4. I thought the big bottleneck has always been rendering the pretty graphics, and that’s taken care of by the gpu nowadays.

    I write a lot of flash/web games, so I have no problem maxxing out the cpu, or at least one core.

  5. I like the idea of tons of stuff running in the background. I have an e-mail monitor, a standalone IM, a browser IM, and a PuTTY session open at all times. I wouldn’t use a dedicated OS mode for gaming if it meant not having instant access to those programs.

    Three days ago, a friend of mine pinged me (through an application), asking to print out a document for her. I did that without exiting the game I was playing at the moment. I mean, I had to pause and minimise, but I didn’t have to end the program and then reinitiate.

    There are games I prefer to play in a window, rather than in full-screen mode, specifically so that I can pay some attention to other applications. My CPU has only two cores, so when a game uses just one, it meas the other one is left for everything else. I like that.

    The best case scenario would be a game that uses all resources, but gives them up as soon as something else needs them. Many games don’t seem to do that, even when I’m in the main menu (why on Earth would a single-player game need to do any noticeable processing at all while in the main menu?). Then again, giving up some resources in an instant would lead to a performance hit. I prefer steady framerate with less eye candy over unreliable framerates.

    Also, I wouldn’t say games make particularly good use of the resources they’re given. Civ5 isn’t that much prettier than Alpha Centauri, nor is its AI that much smarter. But it only takes about an hour for Civ5 to fill up all of my physical memory (a meagre 2 GB), whereas I remember AC running just fine on my 64MB 400MHz Celeron ten years ago.

Comments are currently closed.