Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Any way to restrict/minimise pagefile usage?


  • Please log in to reply
16 replies to this topic

#1
doveman

doveman

    Advanced Member

  • Member
  • PipPipPip
  • 391 posts
  • Joined 22-August 05
I'm running Win7 x64 Ultimate and have 16GB RAM. Left as System Managed, Windows creates a 16GB pagefile (not a problem in itself).

However, it seems to page stuff out when there's plenty of free RAM, which obviously slows things down as it has to page it back into RAM to use it.

I've been trying to use a RAMDisk to run some games from (ArmA, DCS World). I used a 8GB RAMDisk and had about 13.5GB free before mounting and so about 5.5GB after. ArmA itself can only use a max of 2GB, so there's still 3GB+ free when it's running but even so, it seems to page stuff out, even ArmA itself perhaps, as it's starts stuttering after a while and takes a long while to close and causes HDD thrashing for a while after, so it's obviously using the pagefile.

I tried disabling the pagefile completely but then I got error popups when playing about being low on RAM, even though there was over 2GB free.

I've got DisablePagingExecutive set to 1, LargeSystemCache set to 0 and NtfsMemoryUsage is set to 0.

Is there anything else I can do to force Windows to use the actual RAM rather than the pagefile when at all possible?


How to remove advertisement from MSFN

#2
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,252 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag
The question is, why is the system paging things to the paging file that would cause a slowdown with that much RAM? The paging file might hold old pages on the modified list or standby list, perhaps, but only if the system was busy or the app was minimized and idle for an extended period of time on Windows 7. Also, why would it be the cause of your performance issues?

Those would be the issues to investigate/address, although with 16GB of RAM a 2GB paging file and a system set to kernel memory dump should be sufficient under normal usage scenarios. You probably need to determine if your HDD thrashing really is paging file usage - don't just assume.
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#3
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 4,331 posts
  • Joined 14-September 05
  • OS:none specified
  • Country: Country Flag
FWIW, this topic suggests using IMDISK -
http://games.on.net/...p?f=27&t=197327
So it could even be asked how did you create your RAMdisk? AFAIK, you should have a PageFile regardless of it "being needed".

Someday the tyrants will be unthroned... Jason "Jay" Chasteen; RIP, bro!

Posted Image


#4
doveman

doveman

    Advanced Member

  • Member
  • PipPipPip
  • 391 posts
  • Joined 22-August 05

The question is, why is the system paging things to the paging file that would cause a slowdown with that much RAM? The paging file might hold old pages on the modified list or standby list, perhaps, but only if the system was busy or the app was minimized and idle for an extended period of time on Windows 7. Also, why would it be the cause of your performance issues?

Those would be the issues to investigate/address, although with 16GB of RAM a 2GB paging file and a system set to kernel memory dump should be sufficient under normal usage scenarios. You probably need to determine if your HDD thrashing really is paging file usage - don't just assume.


I'm pretty sure it is and it only seems to happen when I've been using the RAMDisk and the way the game starts stuttering and takes ages to close, followed by HDD thrashing clearly points to the game files being swapped out to the pagefile. I've actually got the debugging information set to None, which I presume can only reduce memory usage.

I've set the pagefile to a fixed 2GB now though, so I'll see if it being smaller reduces how much Windows tries to use it.

#5
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,578 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

FWIW, this topic suggests using IMDISK -
http://games.on.net/...p?f=27&t=197327
So it could even be asked how did you create your RAMdisk? AFAIK, you should have a PageFile regardless of it "being needed".

Hmmm.
http://www.msfn.org/...7-x64-ultimate/
:whistle:

jaclaz

#6
doveman

doveman

    Advanced Member

  • Member
  • PipPipPip
  • 391 posts
  • Joined 22-August 05

FWIW, this topic suggests using IMDISK -
http://games.on.net/...p?f=27&t=197327
So it could even be asked how did you create your RAMdisk? AFAIK, you should have a PageFile regardless of it "being needed".


I'm using SoftPerfect RAMDisk, which testing showed to be somewhat faster than IMDisk.

I've checked and the author assures me that it has measures to prevent the RAMDisk itself being paged out but of course once the game files load from the RAMDisk into RAM then I guess it can't prevent Windows swapping them out if it feels like it.

It does seem that Windows gets very upset if you disable the pagefile completely, whether it should strictly be needed or not.

#7
doveman

doveman

    Advanced Member

  • Member
  • PipPipPip
  • 391 posts
  • Joined 22-August 05


FWIW, this topic suggests using IMDISK -
http://games.on.net/...p?f=27&t=197327
So it could even be asked how did you create your RAMdisk? AFAIK, you should have a PageFile regardless of it "being needed".

Hmmm.
http://www.msfn.org/...7-x64-ultimate/
:whistle:

jaclaz


Which part of that 6 month old thread are you Hmmming about?

#8
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,578 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

Which part of that 6 month old thread are you Hmmming about?


You are seemingly not familiar with "directional hmmmming" :w00t: , it was aimed @submix8c ;) .

jaclaz

#9
doveman

doveman

    Advanced Member

  • Member
  • PipPipPip
  • 391 posts
  • Joined 22-August 05


Which part of that 6 month old thread are you Hmmming about?


You are seemingly not familiar with "directional hmmmming" :w00t: , it was aimed @submix8c ;) .

jaclaz


Hmmm (that was a general contemplative hmmm not aimed at anyone in particular), I'll blame my PC's dodgy positional audio for that one :unsure:

#10
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 4,331 posts
  • Joined 14-September 05
  • OS:none specified
  • Country: Country Flag
Hmmmm.... (again :w00t:)

Maybe it's the "games"?
http://stackoverflow...block-of-memory

ARMA - http://forums.whirlp...archive/1251215

Similar via Google
paging "dcs world" game
Hints by the OP (part of Para#3)

ArmA itself can only use a max of 2GB, so there's still 3GB+ free when it's running but even so, it seems to page stuff out, even ArmA itself perhaps

Trying too create a "super gaming computer" and optimizing it. Indications that the GPU has something to do with it as well.

To reiterate what has been said, the "thrashing"/"lockup" more than likely has to do with the use of RAMDisk and placing the game(s) there and the effect of the PAGEing and its size in conjunction with the amount of RAM. (Was that a mouthful?) Also, not recollecting (or searching) exactly what your hardware rig is...

(Disclaimer - Gaming is not my "bag" and optimization I attempt to do through hardware and services/processes. A Tweaker or Expert I am not. Simply well-versed and investigative.)

Someday the tyrants will be unthroned... Jason "Jay" Chasteen; RIP, bro!

Posted Image


#11
doveman

doveman

    Advanced Member

  • Member
  • PipPipPip
  • 391 posts
  • Joined 22-August 05

Hmmmm.... (again :w00t:)

Maybe it's the "games"?
http://stackoverflow...block-of-memory


Yeah, maybe. ArmA and DCS are both pigs to play on any system.

I've got a Phenom II X4 955@3.5Ghz, 16GB RAM, HD6950 2GB, 2TB Samsung and 500GB Samsung, so by no means a super-computer and it seems ArmA at least much prefers Intel CPUs.

Nonetheless, it's normally just about playable (varies from 10fps up to 50fps depending on the amount of AI in use) and the stuttering I noticed when using the RAMDisk was something new.

As the author of SoftPerfect has told me that it somehow prevents the RAMDisk itself being paged out, I assume Windows has some mechanisms to facilitate that. If so, it's a shame that games can't use the same mechanism but I guess they have to allow for it, for systems where there might not be enough physical RAM free (although as ArmA can only use 2GB and I've never seen DCS use much more than that, despite being 64-bit, I'd imagine most systems these days have that spare).

I need to use my dual-boot to setup a clean copy of Windows just for ArmA and DCS. Mind you, I think I've done that before and tend to end up installing everything else on top as well, so I need to try and plan a bit better next time ;)

#12
doveman

doveman

    Advanced Member

  • Member
  • PipPipPip
  • 391 posts
  • Joined 22-August 05
Even now, whilst I'm not playing any games and have about 12GB available, I can see in Resource Monitor that's paging some of my open tabs in Iron as well as System, Jitsi, Game Booster Tray, itype (some of those are going in and out of the pagefile as I watch) so it does seem to be paging unnecessarily. It's obviously frustrating when I have plenty of RAM and it still takes a while when I change tab in Iron because it's decided to page it out (at least I'm assuming that's what's causing the delay, rather than Iron itself paging out the non-current tab contents and having to load them in again when that tab is switched to).

#13
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,092 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

how do you see paging? Run Processhacker, click under tool->page files and look how much data are stored i the page file.

http://processhacker.sourceforge.net/
Posted Image

#14
doveman

doveman

    Advanced Member

  • Member
  • PipPipPip
  • 391 posts
  • Joined 22-August 05

how do you see paging? Run Processhacker, click under tool->page files and look how much data are stored i the page file.

http://processhacker.sourceforge.net/


As I say, Windows Resource Monitor under Disk shows which processes (Image) are using the pagefile (currently only System). ProcessHacker is useful for showing the total usage (currently 422MB and increasing), thanks.

#15
doveman

doveman

    Advanced Member

  • Member
  • PipPipPip
  • 391 posts
  • Joined 22-August 05
With the ArmA2OA 8GB RAMdisk loaded and ArmA2 running, Resource Monitor shows
11851MB In Use
875MB Modified
1720MB Standby
1884MB Free

Available 3602MB
Cached 2592MB
Total 16348MB
Installed 16384MB

and Process Hacker shows that the pagefile usage is 1.84GB.

So clearly Windows is paging something out unnecessarily. It may not be ArmA, but instead some other stuff that Windows think is less important but nonetheless it doesn't appear to be needed.

Shortly after typing the above though, I alt-tabbed back to Arma2OA and it took ages to unpause so it seems likely it had paged some of the game files out. Shortly after that, I got a Windows warning saying that I was low on memory and asking me to close Arma2OA. Once I closed it, pagefile usage dropped back down to 564MB.

#16
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 4,331 posts
  • Joined 14-September 05
  • OS:none specified
  • Country: Country Flag
What you have -
http://www.softperfe...oducts/ramdisk/
What I also found -
http://www.superspee...top/ramdisk.php

RamDisk Plus adds multiple disk support, system page file support<snip>

Don't know what that means... but I reiterate that (probably) even a RAMdisk is paged (it IS in RAM, you know) or the Applications themselves COULD be facilitating paging via the API, in either case you'll be PAGE'd "somewhere". :unsure: Heck, putting a VHD in a RAMdisk and using it instead (double-disks?) may do the same.

Question - if this is a 64-bit OS, why don't you just use a VM and install XP-Mode (limit the RAM) and install the Games there, thus letting the OS/Game do it's thing and be done with it. That is unless all of those games won't run under XP?

Someday the tyrants will be unthroned... Jason "Jay" Chasteen; RIP, bro!

Posted Image


#17
doveman

doveman

    Advanced Member

  • Member
  • PipPipPip
  • 391 posts
  • Joined 22-August 05

What you have -
http://www.softperfe...oducts/ramdisk/
What I also found -
http://www.superspee...top/ramdisk.php

RamDisk Plus adds multiple disk support, system page file support<snip>

Don't know what that means... but I reiterate that (probably) even a RAMdisk is paged (it IS in RAM, you know) or the Applications themselves COULD be facilitating paging via the API, in either case you'll be PAGE'd "somewhere". :unsure: Heck, putting a VHD in a RAMdisk and using it instead (double-disks?) may do the same.


It means that it allows you to to put the pagefile on the RAMDisk I think, basically that it loads early enough in the boot process to allow this

Question - if this is a 64-bit OS, why don't you just use a VM and install XP-Mode (limit the RAM) and install the Games there, thus letting the OS/Game do it's thing and be done with it. That is unless all of those games won't run under XP?


That would only make things worse. The VM, unless running from a RAMDisk, would be loading from HDD and so it would be no better than loading from HDD under Win 7 x64 (probably slower in fact) and the emulated graphics in a VM wouldn't be able to cope with the games anyway.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users