Why do PC games take so much memory?

Started by
21 comments, last by _the_phantom_ 16 years, 6 months ago
Not sure where to put my question. Maybe "For Beginners" but not sure its exactly a beginners question. Game programming seems more fit, but i dont think the question at hand is entirely the fault of programming. So i figure this, as a general board, might be better. If a different section is more appropriate, please let me know. But my question is why do PC games take up so much more memory than console games do, even when its the same game on both platforms? Consoles are restricted in their maximum amount of memory and developers need to be more resourceful about their assets and code in order to fit it in the 512 MB of memory available (for today's consoles). Still, it strikes me a bit odd at the huge disparity of memory consumption and usage for PC games. Im aware the OS, in general, eats up a fair chunk of memory, but even looking at the task manager and how much memory the game allocates for itself, its not unusual to see 1GB+ memory committed to the game - and thats not even counting what it could possibly be taking up in the page file! The extra memory typically present in a PC means developers can use it to their advantage by loading more assets and reducing future load times, have larger levels, more doodads and junk in maps, etc. But im failing to see how some of those things justify a 2 or 3 times difference in memory usage? What exactly is taking up all that memory compared to the same title on a console? Can PC game developers actually be much more resourceful?
Advertisement
Because it's a lot easier to say "upgrade your computer" than optimize memory use?

PC games are kind of used to it.
Im sure theres some of that, but if the developers are already working on a very tight memory manager (for the console version), how difficult can it be to carry over the same concepts to the PC version? They already did a good bit of the hard work.
Typically they are not working on a tight memory limit. They work normally until the lead realises the memory is full and then makes people optimise. This is essential on older consoles, but pretty time-consuming. And there's no need to do it on a PC unless you need the space. If you write a game which uses 1GB and PCs have 2GB, trying to reduce your use to 500Mb is pointless. If your game really needs 2Gb then you need to figure this out.
I think a lot of that is being allocated by DirectX managed memory. More specifically, textures placed into system memory, waiting to be uploaded to the graphics card when needed.

I've never imposed any type of system memory limitations on my own project, happily adding allocations by whatever massive quantity that I want, and it's often using 64MB of video memory. But its memory footprint (shown by task-manager) is only about 31MB. Most likely because I don't use managed resources.
There aren't many games these days that can seriously tax system memory of even a low-end computer by today's standards. A lot of budget PCs are shipping with a gig of memory in them. My girlfriend bought her parents a $348 Compaq with 1GB of RAM. Even if you don't have a gig it's cheap to upgrade these days. Plus, when you're running a game it's not very common for people to have a lot of other applications running at the same time (I log into a separate Gamer account in XP that doesn't load any of the stuff I use in my normal workspace account) so developers pretty much plan for the OS taking up some space and assume they can take all the rest. Which isn't a bad assumption IMO.

I realize this may be a slightly different way to look at the question, but that's how I view it. It's not saying "we use a lot of memory because our game needs it", for me it's more "we use a lot of memory because we can!"

Drew Sikora
Executive Producer
GameDev.net

Well, look at it this way.

A reasonable working set for graphics data nowadays is anywhere in the realm of 384 MB and up, depending on your hardware target. That's data which is currently live in some sort of surface or buffer. From that, it's reasonable to say that at least 256 MB is backed data -- it exists in video and system memory, for events like device lost. (Notice that this data will probably be paged out.)

That's the first 256 MB of missing memory. The higher end the game, and the higher end your graphics card, the more this will be. On a modern high end system, you could do in the 1 GB range without any real difficulty. Oh, and on Vista, the video memory used might show up as used memory too, so you can double the figure.

Then we've got your basic code and data segments. That's all your system DLLs, all of your compiled code along with its associated resources, string tables, lookup tables, etc. Don't forget the OS resources, either. Add a nice 128 MB or so for all that.

Throw in a meager 128 MB for actual game data, and we're already at half a gigabyte. And these are all on the small side nowadays. Did you know that a number of new games are brushing against their address space limits? This is a pretty big problem on Vista, in fact. That 2 GB limit is getting to be a real problem.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Quote:Original post by Promit
[...]That 2 GB limit is getting to be a real problem.
The limit is only for x32, right? I know x64 architectures support much greater address spaces (48 bits at least, iirc), but does windows x64 actually allow full use of it?
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
Quote:Original post by Extrarius
Quote:Original post by Promit
[...]That 2 GB limit is getting to be a real problem.
The limit is only for x32, right? I know x64 architectures support much greater address spaces (48 bits at least, iirc), but does windows x64 actually allow full use of it?
Yeah, that's an x86-32 limitation. It can be expanded to 3 GB on Windows, but that's not a practical solution and it's actually a rather dangerous one.

The amount of space on x86-64...depends. The answer is that 64 bit Windows limits you to 16 TB of address space, but the limitation can be raised arbitrarily. (The bigger it gets, the bigger your PTEs get. PTEs cost real memory, not virtual memory.)
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Thanks for all your responses guys, though im a bit disappointed that the truth of the answer is "we do it cuz we can" from the point of developers. I mean, inst that purposely hurting the game's scalability for lower systems?

Im aware of the argument that its cheap to upgrade ram, but with how RAM hungry these games are (relative to the forced restrictions on a console) having only 1GB of memory, but a $200+ video card would still yield fairly poor performance. Probably smooth framerates when still, but stuttering while moving (and loading assets into view). It only makes the task of upgrading more expensive and confusing for a person not so tech savvy.

Are the semi-small gains (for a good chunk of titles) from the additional use of memory for a PC-console title worth it for PC gamers when they take up twice the amount?

Im bringing this up since i like to play some of my games in windowed mode, and have something else up on a second monitor. But with the game taking up so much memory, it tends to make the other application slow too. Yeah i know im not really helping reduce memory usage :P and i certainly cant do something like that on a console....but its still a bit baffling why they dont purposefully create tighter memory controls.

This topic is closed to new replies.

Advertisement