Windows PageFile Tests/Benchmarks

We know that virtual and system memories are two different things. When calculating the memory requirements of different applications, you might assume that 8 GB of RAM or more would be enough to deactivate the swap file. But there's a catch: unfortunately, some programs specifically want to allocate the virtual memory. In these cases, a missing swap file causes an error or the system memory completely fills with garbage data.

I stopped reading the article after that second paragraph. Every single sentence in that paragraph is full of misinformation.

We know that virtual and system memories are two different things.
This is a questionable statement which immediately sets the article off on the wrong foot.
It makes one wonder if the author believes that Virtual Memory == Page File. This is not the case.
System memory in a virtual memory based operating system like Windows is hidden from view by virtual memory. Just like virtual memory hides the page file from view. Therefore virtual memory is effectively a mapping table that maps a full range of address space between either system memory or the page file.

When calculating the memory requirements of different applications, you might assume that 8 GB of RAM or more would be enough to deactivate the swap file.
Firstly, only fools would believe such a thing. Secondly, the page file is never deactivated. Even when you disable it totally in Windows the kernel will still create a small one for itself so that kernel drivers that require paged pool memory do not BSOD the system immediately.

But there's a catch: unfortunately, some programs specifically want to allocate the virtual memory.
There is NO catch to that prior statement. It was just wrong. 100%. A catch implies that a statement was near correct but had some strings attached. This could not be further from the truth in this case.
ALL memory allocations a user mode program makes are based upon virtual memory. All of them. That memalloc() function in you see in C programs? That will be allocating some virtual memory. So one can assume from this statement that Tom Hardware really DOES believe that Virtual Memory == Page File. Again, this is not the case. The ONLY software that can explicitly request paged pool memory is a kernel driver. User mode applications cannot do this, ever. No API is even exposed for them to do it. All those rumours/FUD you hear about Adobe Photoshop "requiring" a page file because it makes socalled "virtual memory allocations"? Total and utter codswallop. Photoshop "needs" a page file because it is a memory hungry application. It likes to allocate huge chunks of contiguous memory address space. This is something that the average PC will find hard to achieve if it only has system memory available with no page file. Hence Photoshop will crash with an "Out Of Memory" exception.

In these cases, a missing swap file causes an error or the system memory completely fills with garbage data.
This statement makes it seem like there is some line of code in Windows somewhere that does "if pagefile does not exist then throw random error". Again, this is not the case. The "error" that Toms Hardware is talking about is an "Out Of Memory" exception.

As for the second part of the statement about "completely fills with garbage data". Well, I have no idea. That is frankly the most ludicrous and outlandish piece of FUD in the whole paragraph.




It is impossible, utterly impossible, for a user-mode application to say "I would like to allocate some page file based memory, please." There is only one concept available to user-mode applications and that is virtual memory.
They
do not, ever, get to decide whether that virtual memory is paged-in or paged-out, at any given time.

I see Toms Hardware's quality of publishing still hasn't recovered from the day that they Photoshop'd and faked a pre-launch engineering sample of a P4 Northwood die to make it seem as though they had got the jump on every other tech news site.
 
Tom's Hardware said:
We know that virtual and system memories are two different things. When calculating the memory requirements of different applications, you might assume that 8 GB of RAM or more would be enough to deactivate the swap file. But there's a catch: unfortunately, some programs specifically want to allocate the virtual memory. In these cases, a missing swap file causes an error or the system memory completely fills with garbage data.

You have to carefully test whether the installed application can operate without a swap file. If it can, disabling the swap file is a practical way to avoid slow hard drive access. If not, then you'll just have to live with it. The speed increase is noticeable, but not exactly a killer feature.

You hear people say quite often that some applications actually require a paging file, which doesn't make any sense. The paging file is there so the system can write private modified pages out to disk. If there is no paging file, those private modified pages would stay on the modified page list occupying space in memory. This is not something which is going to prevent applications from working correctly.

It seems to me this myth came from the fact that one day someone thought they would disable the paging file but without any consideration to how much system commit their workload requires. The system commit limit, which is the sum of most of physical memory plus the size of the paging file(s), needs to be large enough to support the system committed virtual memory requirements for a given workload.

So, this person, who lets say for instance has a machine consisting of 4GB of physical memory, disables the paging file, which means their system commit limit is roughly 4GB. Before they run the so called "page file required application", the amount of system committed virtual memory which had been allocated was 3.6GB. They then run the "page file required application" which allocates 500MB of system committed virtual memory. However, because they hit the system commit limit, they start running into problems.

They then set the size of the paging file to 1GB and run that particular application again. Now that the system commit limit is actually large enough to support their workload, they don't have any problems. Therefore, they conclude that this particular application requires a paging file. All that really happened though was the process was unable to allocate the virtual memory it wanted due to the fact that the system commit limit wasn't large enough to support their workload.

Tom's Hardware said:
With the swap file deactivated, we ran into problems using 8 GB of RAM (as expected) when Windows ran out of memory. The red values document the state at the time of the crash. If you have 8 GB of RAM installed, you should carefully consider whether it's worth the risk of a possible crash before deactivating the swap file. The performance increase from disabling the swap file is measurable, but still rather modest. At least 12 GB of RAM is needed before you can consider disabling the swap file in a consumer-type environment without worrying--unless you use software that requires a swap file, of course.

A machine which consists of 4GB of physical memory could run absolutely fine without a paging file. On the other hand, a machine which has 24GB of physical memory may require a paging file. The reason for this is because whether or not you need a paging file depends on how much system committed virtual memory your workload requires, which has nothing to do with the physical memory of the machine.
 
Ah yes Fire Wizard but if the application contains no "allocpagefilemem()" calls then it has passed their validation tests and can run on a system with no page file ;) Toms Hardware should publish a tool that scans any given folder's .EXE and .DLL files for any calls to "allocpagefilemem()". Then they can show a great big stamp "Toms Hardware PAGEFILE-FREE APPROVED" badge.



* This whole post is satire. There is no such "allocpagefilemem()" function and never will be.
 
There is the odd app that refuses to run unless a pagefile exists regardless of ammount of total system memory. From recent memory, Dawn Of War II demands a pagefile exists before it will start. Says at least 1.5gb required, but can set any value.
 
Read Nathan's post again. While an application may insist you have a pagefile, they are completely unable to access it directly. These applications know they use a lot of memory so a larger commit limit is probably a good idea - i.e. having a pagefile.
 
There is the odd app that refuses to run unless a pagefile exists regardless of ammount of total system memory. From recent memory, Dawn Of War II demands a pagefile exists before it will start. Says at least 1.5gb required, but can set any value.

Correct however with that you can set a -nopagelimit or something on the shortcut so it doesn't look for a pagefile :)
 
The only way an application can (for reasons unknown) check what your page file is configured to is via querying WMI, looking in the Registry, or otherwise. There might be a Win32 API for it too. But quite why an application would take it upon itself to query this data is a mystery.

It is a bit like a salesman asking how much money is in your debit account before he puts the card in the machine. I.e. it is pretty damn rude and totally irrelevant.
 
Secondly, the page file is never deactivated. Even when you disable it totally in Windows the kernel will still create a small one for itself so that kernel drivers that require paged pool memory do not BSOD the system immediately.

That is another myth. Windows does not always create a page file. If you disable it, it is disabled.

Memory from the paged pool just means that it is not guaranteed to always be in physical memory. It can be paged out, if there is demand for it (IF there is a page file).

Memory from the nonpaged pool will never be paged out. That is the difference.
 
There is the odd app that refuses to run unless a pagefile exists regardless of ammount of total system memory. From recent memory, Dawn Of War II demands a pagefile exists before it will start. Says at least 1.5gb required, but can set any value.

Yep, I can confirm this. When you try and run Dawn Of War II with the paging file disabled, you get the following message.

DawnOfWarII.png


I then added the "-disablepagefilecheck" switch to the .exe and with the paging file disabled, Dawn Of War II ran fine. So, it appears some applications won't actually run if the paging file has been disabled, or doesn't meet a certain requirement, for whatever reason, certainly without modifying anything anyway.

Also, one thing I did find when running Dawn Of War II was that a lot of it's private data is dumped on the modified page list, something which I found unusual.

DawnOfWarII-1.png
 
Back
Top Bottom