Windows Page File Size

jcgriff2

Co-Founder / Admin
BSOD Instructor/Expert
Microsoft MVP (Ret.)
Staff member
Joined
Feb 19, 2012
Posts
21,541
Location
New Jersey Shore
This was a question brought up at another forum, which I answered -- and thought that it should be posted here for Sysnative Members to read, if they wish.

Shplad said:
Do you have any idea why we are seeing Windows installs with such tiny pagefile sizes configured? I assume those were preconfigured by Windows, and not the users, but why so tiny?

During the average Windows installation, Windows does pre-allocate a page file.

It used to be that the page file allocation base size had to be equal in size to installed physical RAM + ~200 MB. If not, then the system was incapable of producing memory dumps. This is because memory dumps are written to the page file.

Beginning with Windows 8, I believe, Windows now allows a much smaller page file to be allocated and it is a variable size, so that when a BSOD or an APPcrash occurs, the system can increase the size of the page file and write the dump to it.

With the explosion of x64 beginning about 10 years ago now, Microsoft recognized that at least some folks would install enormous amounts of relatively cheap RAM into their systems as many had had enough of the very slow XP systems being caused by excessive use of virtual memory (paging - using the page file as RAM when you ran out of RAM). I'm speaking mostly of XP systems that had 128 MB or 256 MB installed physical RAM. Generally, if an XP Pro or Home system had at least 768 MB RAM, the system was much, much faster due to very little, if any, use of virtual memory (paging).

4 GB RAM for x64 became the norm for Vista and Windows 7 for many, but when Windows 8, then 8.1, then 10 came out, people were outfitting their systems with 12, 16, 32 and even 64GB of RAM. This change coincided with the ever-increasing popularity of the then-new SSDs. Many were trying to get by with 128 GB or 256 GB SSD size, only to find a huge chunk was pre-allocated for the page file and therefore caused people to run extremely low or to run out of hard disk space. For many, the answer was to cut-down/delete the page file.

I remember an OP that had a dual-quad core system with 128 GB RAM and a nearly 200 GB page file. This was under Windows 7 and I just could not believe what I was seeing. There is very little chance that any of the 200 GB page file would ever be used except in the event of a BSOD. Some apps like Notepad and SysInternal's Process Monitor do write directly to the page file, but these are the exceptions, not the norm. If you run Notepad and have no page file, a temporary one will be created.

I have an HP ENVY 17 core i7 laptop with 12 GB RAM and my page file is just under 8.6 GB -- and I have had a few BSODs. My page file:

Code:
AllocatedBaseSize=8576
CurrentUsage=2768
Description=C:\pagefile.sys
InstallDate=20131220133842.488186-300
Name=C:\pagefile.sys
PeakUsage=7992
Status=
TempPageFile=FALSE
My page file was allocated during initial system boot-up on 12-20-2013 with a base allocation size of 8576 MB (~8.6 GB). I currently am using 2768 MB (~2.8 GB) of virtual memory (due to many open Notepads); my peak virtual memory usage since last re-boot was 7992 MB (~8 GB). Current RAM usage = 10.4 GB/ 12 GB installed physical RAM (obtained from Process Explorer).

If you would like to see your page file info, run #34 in my WMIC Tutorial - "

(wmic pagefile) - Windows Management Instrumentation (WMI) - (Windows 10, 8.1, 8, 7, Vista)

Please forgive the formatting (the extra link in the box) -- it appeared after we just migrated from vBulletin to XenForo forum software.

You can run #34 - either obtaining a TEXT file output or an HTML file output. I assure you that all of the batch files are safe to run. In fact, we just purchased a digital certificate and are just starting to apply it to all of our apps.

So, that same OPs system running Windows 10 with 128 GB RAM will have a relatively small page file these days under Windows 10 - maybe 10 or 20 GB, which is very likely more than enough to capture full kernel memory in the event of a BSOD. It is kernel memory that needs to be analyzed after a BSOD - not the contents of physical RAM.

Anyway, that is my theory on why we have seen dramatically reduced page files beginning with Windows 8.

The Hibernation File (c:\hiberfil.sys) has been trimmed too. Instead of it being equal to the amount of physical RAM, it now is about 75% in size of total physical RAM.

Regards. . .

jcgriff2
 
Last edited:
Hi,

On my Dell laptop with 8GB upgraded latter to 16GB that is running Windows 7 I have this:
44039
Windows recommends around 24GB of Page File!!

my log:
AllocatedBaseSize=16259
CurrentUsage=1689
Description=C:\pagefile.sys
InstallDate=20121106104957.516815+000
Name=C:\pagefile.sys
PeakUsage=7134
Status=
TempPageFile=FALSE
 
@SleepyDude

You did fine by checking the "Automatically manage paging file size for all drives" box.

As you can see, Windows allocated a 16259 MB (~16.3 GB) page file, far lower than the "Windows Recommends" size of 24.4 GB.

Just curious as this has caused many people grief -- did you then delete the page file and then let Windows reallocate the page file after the RAM upgrade from 8 GB to 16 GB?

Or did you at some time reinstall Windows with the 16 GB RAM installed?

I ask because it was an OP with a RAM upgrade that forced me to dig into this nearly 10 years ago. OPs system was either Vista or Windows 7 and would not produce a BSOD dump. That's when I came upon all of this information.

The OP in my case had upgraded RAM like you, but never reallocated the page file after the new RAM was installed (seriously though -- who would do that -- or even think about doing it??), so the Allocated Page File Size was less than installed physical RAM; hence no dump was produced.
 
I have the OS set to Automatic from the beginning and this is the original installation I simply did the memory upgrade.

If I remember correctly after the upgrade Windows created a Page File a little bigger.
 
This video from Microsoft discusses some interesting details about dumps, dump sizes, and some plans they had for dump files as of June 2017. The series often seems to have interesting nuggets of information of which I was unaware. It seems like it might be a good supplement to this thread.
 
Back
Top