Page File use...

Ormorof

FH is my second home
Joined
Dec 22, 2003
Messages
9,888
ok, i dont understand alot of this stuff but here goes....

for some reason my PC uses its pagefile, alot, it says theres loads of available memory (im only running firefox, winamp, zonealarm and the anti-virus atm) yet for some reason it feels the need to access 315MB of the pagefile....

now correct me if im wrong but its only supposed to use that if all the other memory is unavailable? it means things are kinda loading slowly atm, got loads of spare hard disk space, 1GB of RAM in total so dont understand why everythings so slow (the processes part in task manager doesnt pick up any memory heavy things... )


ive run a virus scan, a spyware/adware scan and still cant figure it out, atm though the only problem is the sound slows down occasionaly which can be kinda irritating, only happens when im not using anything else (windows getting bored perhaps? :p ), never when im playing games (been playing BF2 online with high gfx settings with no problems and same with WoW )

any ideas?
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
windows will page regardless of available ram, because they follow the school of having as much ram free as possible. this is done because the user could choose to load a program at any time that would want some memory. with the memory instantly available this can be done, as opposed to doze swapping something out and then loading the program.

there may indeed be a problem, so it's wise to run (as you already have) several anti-virus and anti-spyware apps to see what happens. also, perhaps you have lots of fonts installed? doze will try to preload all of them iirc, which is a bit naff tbh. there may be a program on the interweb somewhere that lets you view swapped-out stuff in the pagefile, but I'm not aware of it at this time.
 

Mazling

Can't get enough of FH
Joined
Jan 11, 2004
Messages
1,419
There was a reg setting for Win 98 that forced windows to use ram before paging. Gone since 2k. USELESS!
 

Ormorof

FH is my second home
Joined
Dec 22, 2003
Messages
9,888
damn :(

if what im looking at is right it says there is 783528 (K) available in physical memory... i assume thats my RAM? annoying then that is still insists on using 500MB of PF when the only thing running is winamp :(
 

Jonty

Fledgling Freddie
Joined
Dec 22, 2003
Messages
1,411
Hi Ormorof

TdC's explaination is very good, as ever :D Before I write what I'm about to I must strongly recommend that you let Windows continue to take care of the page file. Very rarely will this be the root cause of any problems, unless you have a particularly unusual system setup.

Anyway, if you are running XP, try Control Panel > System > Advanced (Tab) > Performance Options (Button) > Advanced (Tab) > Virtual Memory (Change Button). From there you can tinker as you like. As I say, however, some programs require a page file simply because RAM isn't always large sufficient, and forcing Windows not to use one may cause some instability which detracts from any gains made.

Personally I'd go with TdC's suggestion and look elsewhere for any problems. Try updating your soundcard's driver, as this seems to be your main problem. If you're using an integrated sound chipset on your motherboard these may offer some from a few more problems (like greater CPU demands) than traditional add-on soundcards.

Kind Regards
 

xane

Fledgling Freddie
Joined
Dec 22, 2003
Messages
1,695
First the obvious; are you the only user or is someone else logged in ? Fast User Switching will need RAM and is ultimately swapped out to the pagefile when the user is switched.

TdC said:
windows will page regardless of available ram, because they follow the school of having as much ram free as possible. (...)

This is not quite true, and has become a bit of a myth.

A pagefile is only really used for modified pages, any RAM that is designated as "writeable" is copied to the pagefile regardless of whether it will get swapped out later, therefore the pagefile is always used.

Applications that designate huge swathes of RAM as writeable will also generate huge usage of the pagefile, in most cases this is deliberate as certain applications require large amounts of writeable RAM, a graphics application for example. There are probably plenty of badly written applications that allocate far more writeable RAM than is necessary and generate unnecessary pagefile usage.

It is not so much how many applications you have running, but how much writeable RAM is required.

The "free RAM" myth is because Windows allocates a lot of RAM for file caching which is often never used and also retains program code in RAM even after it is unloaded, both are seen as "free" which actually means they can be used for other purposes, not that it is not being used.
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
arr, I defer to your greatness. I knew it was always used, just not *why*. makes me shudder when contemplating the idea of running a "proper" application on a doze box.
lucky for me I know it's just impossible ;)
 

xane

Fledgling Freddie
Joined
Dec 22, 2003
Messages
1,695
Just a correction on what I said.

Under Windows, writeable RAM is not physically copied to the pagefile immediately, but it will still allocate pagefile space when writeable RAM is needed, showing up as "pagefile usage".
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
so if I have a program that wants 3gb it will allocate (3gb - available ram) on disk? bleh :/

didn't NT "pretend" to display 4096mb writable ram to every single app? I just felt a twinge in my pagefile tbh :/
 

xane

Fledgling Freddie
Joined
Dec 22, 2003
Messages
1,695
TdC said:
so if I have a program that wants 3gb it will allocate (3gb - available ram) on disk? bleh :/

One of those "in theory" answers, in practice when you start using that kind of amount of writeable RAM, especially when it exceeds available RAM, other methods are used to swap it.
 

Jonty

Fledgling Freddie
Joined
Dec 22, 2003
Messages
1,411
Great explanation, xane :D

I've been reading up about Windows x64 of late and it now supports, hardware-pending, 128GB RAM and 16TB virtual memory :)

Kind Regards
 

Ormorof

FH is my second home
Joined
Dec 22, 2003
Messages
9,888
mmm nice explanation :p

well i ran virus, adware/spyware scans and found nothing but reinstalling the sound drivers seems to have reduced the problem (for example running nothing, or very little it rarely goes above 250MB whereas before it was on 750MB :p )
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
just for your info mine is 230MB now running three instances of firefox (and all the crap in the systray)
 

Danya

Fledgling Freddie
Joined
Dec 23, 2003
Messages
2,465
Read-only can also be paged if required, so the pagefile isn't only backing writeable RAM. Most of the read-only data in an app is embedded into the exe though, in this instance the pagefile is not used - if the data needs to be paged to disk it just marks the RAM free and pages in back straight from the exe when required.
Either way, generally all memory in use has to be backed on disk somewhere.

didn't NT "pretend" to display 4096mb writable ram to every single app?
Windows displays a unique 4GB address space to every app. It's not quite the same as 4GB of writable RAM and certain parts of the adress space have special properties. Generally apps get to use 2GB of it for their own purposes, the other 2GB being used by the system.
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,925
Danya said:
Windows displays a unique 4GB address space to every app. It's not quite the same as 4GB of writable RAM and certain parts of the adress space have special properties. Generally apps get to use 2GB of it for their own purposes, the other 2GB being used by the system.

arr cheers. the days of me actually knowing stuff about windows internals are long past :)
 

xane

Fledgling Freddie
Joined
Dec 22, 2003
Messages
1,695
Danya said:
Read-only can also be paged if required, so the pagefile isn't only backing writeable RAM.

I think this is where bad programming comes in, large chunks of writeable RAM are allocated when they are not needed as writeable, i.e. they are read-only, so generating pagefile usage.

What I am saying is that the pagefile gets "used" in some way even if swapping does not occur. On a majority of virtual memory systems the pagefile is written to before the RAM is swapped out, so excessive swapping does not generate massive sudden amounts of disk usage.
 

Users who are viewing this thread

Top Bottom