0

I was going through my computer to understand what's taking up space. I stumbled upon this file as one of them. A little checks led me to understand that it's a system file where Windows stores docile app data during underusage.

I checked the arguments for and against deleting it. However, my question is, if you have a machine that has huge RAM and runs ram intensive applications, would the pagefile.sys be larger or smaller, since probably the system has enough memory to run.

fixer1234
  • 28,064

2 Answers2

2

Yes, there are people who run without a pagefile and everything seems fine. However, it is not recommended. Microsoft says dont do it. On top of that, some applications will not work without it.

You do have options. You can reduce the pagefile' size. It is important to note, decreasing it to much could have a negative effect, especially if you are RAM hungry. You can play with the settings, to find what is optimal.

Another option, would be to move the pagefile to another drive. While MS recommends having a pagefile on the system volume, it can be small. You can create another pagefile on another drive. The OS will work with both of them.

Its hard to tell based on your question... It sounds like you are just curious about the large file. If you arent dying for space, just leave it alone. And if you are dying for space, removing the pagefile isnt the answer, getting more storage is.

Keltari
  • 75,447
1

There are quite split opinions about deleting the page file.

Microsoft states the following: (Source)

For example, when a lot of physical memory is installed, a page file might not be required to back the system commit charge during peak usage. The available physical memory alone might be large enough to do this."

Also there are two answers on my superuser question with the same opinion and this answer.


But for a general use case (and the majority of people share this opinion, see 4, 5), it is considered safer to not disable the page file (See here and also here where Mark Russinovich is quoted).

More reasons for having a page file:

  • There are diverse programs that need a page file in Windows to be able to work flawlessly (again 6, 9, 10, 11)
  • Windows needs a small (min. 400MB) on the system partition (10). Having 800MB for kernel memory dumps is recommended, but the complete memory dump (needs slightly more than the total amount of RAM) is mostly not needed (13). See also this blog post or this answer.
  • There is a common misconception: Eliminating the page file won’t eliminate paging to disk! (Source)

More detail provided by this brilliant serverfault answer, which makes clear, how the pagefile works:

Many people seem to assume that Windows pushes data into the pagefile on demand. EG: something wants a lot of memory, and there is not enough RAM to fill the need, so Windows begins madly writing data from RAM to disk at this last minute, so that it can free up RAM for the new demands.

This is incorrect. There's more going on under the hood. Generally speaking, Windows maintains a backing store, meaning that it wants to see everything that's in memory also on the disk somewhere. Now, when something comes along and demands a lot of memory, Windows can clear RAM very quickly, because that data is already on disk, ready to be paged back into RAM if it is called for. So it can be said that much of what's in pagefile is also in RAM; the data was preemptively placed in pagefile to speed up new memory allocation demands.

Further reading is provided here

Glorfindel
  • 4,158
Cadoiz
  • 567