Page File

life24

Senior member
Mar 25, 2014
283
0
76
Hi,
In widnows 8.1 , When memory is limited,The OS movement many page file from RAM into Hard disk.
But now i have more additional ram and free.
But 3GB page file in windows created!!
Why?
Why windows 8.1 don't used from free RAM?
Pictures attached.


 

mikeymikec

Lifer
May 19, 2011
19,911
14,156
136
A page file of an automatically determined size is automatically created when Windows is installed. I imagine that if RAM is upgraded, the size of pagefile.sys is re-evaluated.

Just because pagefile.sys is ~3GB in size, it does not mean that Windows has paged 3GB of memory to disk. As I understand it, it's quicker to write to a file that has been already created and is the correct size rather than having to make additional requests to allocate more file space to a file then write the necessary data. Also, it's less likely to get fragmented if it never needs increasing in size.

I'm curious about the existence of swapfile.sys in that list though.
 

greenhawk

Platinum Member
Feb 23, 2011
2,007
1
71
All windows will create and use a swap file. Besides, it also sets aside some space so that if the computer runs out of RAM, it has some space it can use which might not be available at a later time if the OS drive is full.

You can disable the swap file (in previous OS' you could, I have not played with windows 8 yet), but it is generally advisable not to. Espically as some programs I have come across over the years that will refuse to run/install if they do not detect a swap file that can have it's size increased.
 

redzo

Senior member
Nov 21, 2007
547
5
81
Thing to take into account regarding shrinking too much or completely disabling the page file: Make sure that the system never runs out of physical RAM. Unfortunately, even if you take a lot of precautions, a simple program error(like an application memory leak, for example) will mess things up for you.

I had to fine tune the paging file again after many many years. For compatibility reasons, is always better to leave it for the OS to manage its size. But ssd endurance concerns made me get back to the old and bad habit of altering the size of the pagefile. I don't take moving it on a mechanical hdd as a solution as this might negatively impact overall system performance(performance being one of the main benefits of OS's running on top of ssd's).
 

john3850

Golden Member
Oct 19, 2002
1,436
21
81
Because I never use more then 12Gb of memory I set a 4GB ram pagefile with 1024mb on the os drive.
 

KingFatty

Diamond Member
Dec 29, 2010
3,034
1
81
Manually set the pagefile to 500 megabytes (0.5 gigabytes).

You have 16 GB of RAM, so your computer will be unlikely to actually use the pagefile, but it is created by default. You could even delete it entirely, because you will be very very unlikely to run software that needs to use a pagefile in a computer that has 16 GB of ram.

I've set my pagefile to 0.25 GB and have never gotten an error. You can also enable a feature to allow the computer to enlarge/grow the pagefile if necessary. And your computer will likely never enlarge a tiny pagefile when you have so much ram.
 

BonzaiDuck

Lifer
Jun 30, 2004
16,118
1,730
126
After observing the "Great Pagefile Discussions" for a while now, I've only made brief experiment of different pagefile configurations with my boot-system SSD thrown into the mix.

Consider "first thoughts" about how user-limited pagefile size affects (a) available disk space and (b) performance.

The first item depends on your hardware configuration choices: Did you actually spend money for 32GB of RAM, but choose to deploy an HDD (or even SSD) of only 100 GB? The question evaporates if you add additional disks for a range of storage functions, since the swapfile can be allocated among those disks.

I can easily afford a swapfile of default 16GB (given my RAM hardware) with the three ~500GB disks (2x SSD and 1x HDD) in my system. So the only reason I might fiddle with it manually would be any indication that actual performance significantly decreased under Windows own swapfile management.

I haven't seen anyone present any examples of degraded performance for using a Windows-determined swapfile size.
 

john3850

Golden Member
Oct 19, 2002
1,436
21
81
If your pc is set to sleep or is on 24/7 then a pagefile is nice to refresh your stale memory when needed.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,202
126
pagefile.sys AND swapfile.sys? On an NT-based box? Interesting.

At least on VMS, there was both a pagefile, and a swapfile. The idea being, that the pagefile was for virtual memory, for actively computing processes, and the swapfile, would hold processes that were swapped out in their entirety, because they were in a non-computable state (waiting on locks, I/O, etc.)
 

KillerBee

Golden Member
Jul 2, 2010
1,750
82
91
always store your page file on a ramdisk for quicker access :p

Seriously for anyone who thinks you really need a page file no matter how much memory you have - or else it breaks something

Setting up a page file in a RAM disk when Windows starts with Imdisk:
http://forums.guru3d.com/showthread.php?t=356046

Will need their "swapadd" utility and use like this to create a 1GB drive to store the pagefile on the W: drive ramdisk:
imdisk -a -s 1G -m W: -p "/fs:ntfs /q /y"
swapadd W:\pagefile.sys 990M 990M
 
Last edited:

Scarpozzi

Lifer
Jun 13, 2000
26,391
1,780
126
I've got some Windows systems with 24-48GB of RAM....I've hard coded the size of the page files on those systems. It was eating into my file system too bad because the disks are SAS (smaller and more pricey than SATA).

They use an algorithm to set the size, but "They" aren't always right...that's why you can adjust it as needed. Change it, reboot, and if you see performance issues, change it again to something else.

I've read some people have totally disabled it when using virtualized environments, but that's to keep disk I/O from being subjected to un-needed chatter in large virtualized desktop environments (VDI/XenDesktop/etc). I've never bothered with ESX or Windows servers.
 

KillerBee

Golden Member
Jul 2, 2010
1,750
82
91
The phrase "pants on head retarded" comes to mind. If you don't need a page file, putting one in RAM is exactly that - pants on head retarded.

lol - If only you had learned to read things before spewing your wisdom
 

thedosbox

Senior member
Oct 16, 2009
961
0
0
lol - If only you had learned to read things before spewing your wisdom

Read what? Even the author of the guru3d thread admits it's not a good idea.

Regardless, if you don't need a page file, why the hell would you stick one in RAM?
 

KillerBee

Golden Member
Jul 2, 2010
1,750
82
91
Well the point is some people think you do need a page file to make certain apps work - no matter how much memory you have - I haven't experienced it myself though.

So for those who feel it is necessary to have at least some page file
here is a way to create a ramdisk on bootup and have the page file stored there.

Yes it sounds ridiculous but if you really really need to have a page file and have a lot of excess ram this may be better
 
Last edited:

KillerBee

Golden Member
Jul 2, 2010
1,750
82
91
Ah I see now - you have your pants on your head - this may be your first problem.
 

KingFatty

Diamond Member
Dec 29, 2010
3,034
1
81
It's interesting that the Adobe crank's posts are merely assertions, and no proof is offered. It's so easy to just refer people to the files in question, so their absence is notable and he sounds like he's just proselytizing.