0

Recently, I was scanning the C drive and I noticed pagefile.sys took up a whopping 32 GB of storage. Now I did some research and found out that pagefile is for virtual memory, which makes Windows 10 use your disk for memory storage. Many oddities arose from this however:

  1. Why is the pagefile 32 GB, I have 32 GB of physical DDR4 RAM and currently not even 5 GB of RAM is used? Normally, the pagefile is around 3-4 GB which is understandable, but what causes it to become so big?

  2. In task manager, it looks like the committed bytes of memory matches the physical + virtual memory. In my case I have 64 GB of ram committed (32 physical + 32 pagefile), does that mean given the right CPU, I can open the same amount of chrome tabs as a 64 GB machine, or is the pagefile sort of useless?

  3. The processes tab on task manager display how much memory each program is using, and while I have researched "task manager memory not adding up", it appears it does add up in the "users" tab, given I am the only user. So how would I find the true amount of memory my PC is using? And, how to make task manager show the "true memory usage" of each program given admin rights? (i.e. processes tab displays 3 GB used, performance tab shows 8 GB, how to reveal that extra 5 gigs in the processes tab?)

  4. What is compressed memory? Why is it so miniscule compared to the actual in use?

You can see, within task manager, the memory section is the most confusing out of all of them.

1
  • If you really want to understand this, I would suggest you watch: "Mysteries of Memory Management Revealed,with Mark Russinovich (Part 1 of 2)WCL405 HD", you can find it on YouTube and part 2. I would suggest getting RAMMap and watching the Channel 9 video at the bottom of the page. Mar 30, 2021 at 23:18

1 Answer 1

0

Adjusting virtual memory, and by that, adjusting pagefile.sys size, is somewhat arbitrary. For your PC's specifications, 32 GB is reasonable. As to why:

When RAM was measured in MB rather than GB, the general recommendation was to set virtual memory to at least the size of the largest program's memory requirements, since some applications required more memory than there was physical RAM. Of course, a program effectively running from disk was l e t h a r g i c, because the HDD (or even floppy!) is perhaps 1,000 time slower than RAM.

As the OS improved, it became possible to swap only parts of memory to HDD, so if a DLL was used infrequently, e.g., just for printing, that part of the program might be moved to disk until needed. Recommendations were to allow 1.5 to 2 times the RAM size for the swap file.

Today, with large physical RAM and a reversion to smaller SSD's, it might be profitable to reduce the size of the swap file... but do not reduce it too much, lest the system become unbootable.

My current preference is to set both minimum and maximum size of virtual memory to approximately that of physical RAM, or somewhat less on SSD with little extra space. The reason for keeping maximum and minimum the same is to reduce disk fragmentation as pagefile.sys grows and shrinks, though Windows automatically optimizes the disk, anyway.

To set virtual memory:

  • Press WindowsPause to open the System CPL.
  • Note the amount of Installed System RAM.
  • Click on *Advance system settings.
  • On the Advanced tab of the System properties dialog, click on Performance Settings....
  • On the Advanced tab [Yes, again; this must be very advanced!], under Virtual memory, click Change....
  • Set a custom size, rather than Automatically manage paging file size....
  • Note the recommendations, though the minimum allowed is far too small for most purposes, and trying to run with no paging file is asking for trouble! Try some values between 0.5 and 1.5 times RAM size for starters. That should free up some disk space, if you wish. See if there is any difference in performance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.