Skip to main content
GameDev.net gamedev.net
🔒 Locked

windows ram usage and ram usage in games

Started by ade-the-heat Oct 16, 2005 at 3:03 PM 5 replies 950+ views
Original Post
ade-the-heat
ade-the-heat
My pc has 512 MB ram. I want to know how much ram is being used on Windows and in my game So I go to Task Manager on Windows and go to the Performance tab. At the moment it says PF Usage 366 MB Physical Memory Total 523248 k Available 94280 k System Cache 152536 k If I start my game PF Usage goes up to 386 MB So this says my game runs in 20MB of ram (approx) Fine ! But of my 512 MB how come 366MB are being used and yet I have no applications running on my desktop ? Or is this 366 MB something else? If I've got 366 MB being used now, that means I have only about 150 MB or so to run the latest games. If these figures are correct how can I get ram usage down to near zero when I'm not doing anything ? yours confused Ade
mecha
mecha
Quote:
Original post by ade-the-heat
My pc has 512 MB ram.
I want to know how much ram is being used on Windows and in my game
So I go to Task Manager on Windows and go to the Performance tab.

At the moment it says

PF Usage 366 MB

Physical Memory
Total 523248 k
Available 94280 k
System Cache 152536 k

If I start my game PF Usage goes up to 386 MB

So this says my game runs in 20MB of ram (approx)
Fine !

But of my 512 MB how come 366MB are being used and yet I have no applications running on my desktop ? Or is this 366 MB something else?

If I've got 366 MB being used now, that means I have only about 150 MB or so to run the latest games.


If these figures are correct how can I get ram usage down to near zero when I'm not doing anything ?

yours confused

Ade


It is impossible to get RAM usage to 0% because a computer must run its operating system files and maybe some background programs.

The way I understand it, if your RAM goes over the computer will use virtual memory from the hard drive. The reason for more RAM is for faster computer performance and less freezing. If you don't have problems with this, then you shouldn't need to worry about it.
quotes from mecha during sugar-fueled programming:"These sprites make me thirsty for Sprite.""If the Unreal engine was a person, it would be the young, energetic, beautiful girl that only rich guys can have.""The game is being delayed to create a nicer AI script. The last one picked a fight with our programmer.""What is the size of a Crystal's Space?"
ade-the-heat
ade-the-heat
ok, but are my figures correct or am I looking at the wrong numbers on Task Manager ? In any case 366 MB usage seems high considering I'm not doing anything when I only have 512 mb anyway.
mecha
mecha
Quote:
Original post by ade-the-heat
ok, but are my figures correct or am I looking at the wrong numbers on Task Manager ? In any case 366 MB usage seems high considering I'm not doing anything when I only have 512 mb anyway.


Look at the words "Commit Charge" at the bottom right-hand side of Task Manager. The numbers before the / are how much memory your system is using.

quotes from mecha during sugar-fueled programming:"These sprites make me thirsty for Sprite.""If the Unreal engine was a person, it would be the young, energetic, beautiful girl that only rich guys can have.""The game is being delayed to create a nicer AI script. The last one picked a fight with our programmer.""What is the size of a Crystal's Space?"
smonahan
smonahan
Just for comparison, I run XP and a few piddly tray apps, and I'm at 298M with nothing else running. I do run a free little tray program called Rambooster, who knows if it helps that much.
LessBread
LessBread
Quote:
Original post by ade-the-heat
But of my 512 MB how come 366MB are being used and yet I have no applications running on my desktop ? Or is this 366 MB something else?


That 366 is pagefile not RAM. If you're running XP or W2K, you probably have a bunch of system services running in the background. Some services are necessary, many aren't. Black Viper's pages seems to be gone, but someone stashed the google cache: Service Configurations. That should help you tweak your system, reducing pagefile usage.

Quote:
Original post by ade-the-heat
If these figures are correct how can I get ram usage down to near zero when I'm not doing anything ?


Why would you want to?
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
markr
markr
As far as I've managed to figure out, Windows Task manager is pretty much a random number generator.

It only seems to count certain types of memory. In an operating system which supports virtual memory, working out how much ram "belongs" to any given task can be difficult. This is because:

1. A lot of programs share memory (notably DLLs). The system DLLs are probably very large - several dozen megabytes for a typical set. This is shared by almost all processes. So which process do they "belong" to?
2. Programs memory-map files. Does this count? Does it count exactly once, even if they're the only program doing so?
3. Device drivers memory-map devices into process address-space (notably video device drivers). Does this count?
4. The same memory can be mapped in more than once
5. Some programs are in fact daemons which are "using" memory "on behalf" of some other process in the system. Examples of this are CSRSS in WinNT and X on Linux.

Basically it becomes very difficult.

The only really sound way to measure it is to use a memory profiler, which measures your own program's private allocations. The OS own measurements gets inflated and/or underestimated by a variety of factors, some of which aren't consistent from one system to another.

Mark

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.