Relation between memory used and frames per second

Started by
13 comments, last by snowmanZOMG 11 years, 3 months ago

These papers explain all that you need to know about accessing memory in cache friendly ways, and why it's so important. I've sorted them by difficulty of understanding (IMHO).

Multi-core is Here! But How Do You Resolve Data Bottlenecks in PC Games?, Michael Wall (AMD), GDC 2008

http://developer.amd.com/wordpress/media/2012/10/AMD_GDC_2008_MW.pdf

Pitfalls of Object Oriented Programming, Tony Albrecht (SCEE), GCAP 09
http://research.scee.net/files/presentations/gcapaustralia09/Pitfalls_of_Object_Oriented_Programming_GCAP_09.pdf

CPU Caches and Why You Care, Scott Meyers, Ph.D.; ACCU 2011 Conference.
http://www.aristeia.com/TalkNotes/ACCU2011_CPUCaches.pdf

Advertisement
Thanks you! With this information I can start researching about memory optimization.

Edit: Just the last cuestion,
how can memory leaks affect the preformace of the aplication?

It depends on the platform. On console platforms, it's bad. You almost cannot leak any memory at all, because consoles don't have a sophisticated virtual memory system that modern desktop PCs do. When you run out of memory on a console, you just crash and burn. But it's unlikely you're working on a console.

Desktop PCs, because of their fancy virtual memory systems, memory leaks are still bad but they're not nearly as catastrophic as on consoles. The amount of "fast" working memory for the operating system to hand out to running processes will slowly decrease and it will start to page out processes onto the disk, which is extremely slow. I like to think of memory use on desktop PC platforms as mostly about being what I like to call "A good software citizen". Use your share of memory; don't be greedy and send back what you don't need. If you do end up using too much, it's usually not the end of the world, but everyone is going to hate you, especially the user of the computer.

Thanks, im not working on a console but its an option for the future, so its good to know this.

You really should strive to have no memory leaks though. Even though desktop platforms can be forgiving, it can be a huge nuisance to end users if you leak memory since it will cause the whole system to drag even though it's just your application that's leaking. Mozilla has been fighting this exact fight for years now, and only recently have they made significant improvements to the way Firefox reclaims memory, specifically from addons, which are a prime source of memory leaks.

There are some good points made in this GDC 2008 presentation by Elan Ruskin about a bunch of things related to game development: http://www.valvesoftware.com/publications/2008/GDC2008_CrossPlatformDevelopment.pdf. I would highly recommend taking a look at slide 25 and onwards for some treatment of memory in games. A lot of those things are really only necessary for large studios or games that really push limits of systems, but there are a lot of useful tips in there, such as knowing where all the memory is going.

This topic is closed to new replies.

Advertisement