Skip to main content

How To Manage Virtual Memory (Pagefile) In Windows 10

This tutorial was written by Tom's Hardware Community member viveknayyar007. You can find a list of all their tutorials here.

Pagefile in Windows 10 is a hidden system file with the .SYS extension that is stored on your computer’s system drive (usually C:\). The Pagefile allows the computer to perform smoothly by reducing the workload of the physical memory, or RAM.

Simply put, every time you open more applications than the RAM on your PC can accommodate, the programs already present in the RAM are automatically transferred to the Pagefile. This process is technically called Paging. Because the Pagefile works as a secondary RAM, many times it is also referred to as Virtual Memory.

The minimum and maximum size of the Pagefile can be up to 1.5 times and 4 times of the physical memory that your computer has, respectively. For example, if your computer has 1GB of RAM, the minimum Pagefile size can be 1.5GB, and the maximum size of the file can be 4GB.

By default, Windows 10 automatically manages the Pagefile according to your computer’s configuration and the RAM present in it. However, if you ever face lagging while working on Windows 10, or you start getting the PAGE_FAULT_IN_NONPAGED_AREA or KERNEL_DATA_INPAGE_ERROR Blue Screen of Death (BSOD), managing the size of the Pagefile manually is the first thing you should look for.

Managing the Pagefile size manually in Windows 10 is simple. Here is how:

  • Use an administrator account to log on to Windows 10.
  • From the desktop screen, right-click the Start button to open its context menu.

  • Click System.
  • From the left pane of the System window, click Advanced system settings.

  • On the System Properties box, ensure that you are on the Advanced tab.
  • Click the Settings button from under the Performance section.

  • On the Performance Options box, go to the Advanced tab.
  • Click the Change button from under the Virtual memory section.

  • On the Virtual Memory box, uncheck the Automatically manage paging file size for all drives checkbox.
  • From the available list, click to select the drive on which Windows 10 is installed. (C: in most cases.)
  • From below the list, click to select the Custom size radio button.
  • In the now-enabled fields, type the minimum and maximum size of the Pagefile in megabytes (MB) according to the physical memory present in your computer.

  • Click Set and then click OK.
  • Restart your computer when you're done.
  • derekullo
    Is the chance of getting a PAGE_FAULT_IN_NONPAGED_AREA or KERNEL_DATA_INPAGE_ERROR Blue Screen of Death higher if you use System managed setting?

    Why would you adjust the size of the page file?


    Why would the amount of ram you have present dictate the size you should set your page file to?

    That seems counter intuitive and may even make the system unstable.

    For instance if my computer had 8 gigabytes of ram and I wanted to open a giant 20 gigabyte TIF picture.

    My system might very well crash if we use the logic of 8 gigabyte maximum Virtual memory.

    8 gigabyte ram + 8 gigabyte page file = 16 gigabyte combined maximum
    Reply
  • stdragon
    Adjusting the page file is not the first thing I'd recommend in the event of a BSOD. Reviewing the mini-dump file and logs will illuminate the root cause is most cases. It could be a faulty driver or resource conflict. It could also be hardware related such as bad RAM or incorrect memory timings; an uncorrectable error from a bit flip will cause a kernel panic (which is what a BSOD is)
    Reply
  • Sam Poland
    If it ain't broke, don't fix it.

    "...an optional, hidden system file on a hard disk."

    "...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."

    https://support.microsoft.com/en-us/help/2860880/how-to-determine-the-appropriate-page-file-size-for-64-bit-versions-of
    Reply
  • klyze
    20903209 said:
    If it ain't broke, don't fix it.

    "...an optional, hidden system file on a hard disk."

    "...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."

    https://support.microsoft.com/en-us/help/2860880/how-to-determine-the-appropriate-page-file-size-for-64-bit-versions-of

    The appropriate page file size i needed was the exact reason i clicked in the article.. thanks!
    Reply
  • WINTERLORD
    should i disable the page file with 16gb of ram would that improve performance at all
    Reply
  • ex_bubblehead
    20903498 said:
    should i disable the page file with 16gb of ram would that improve performance at all
    Windows requires that a page file be present, otherwise very nasty things will happen when the system runs low on RAM and there is no page file to back it up. If you have 16GB or more RAM then just set it to a static size of 2-4GB and leave it alone. Increase as/if necessary.
    Reply
  • Chesschamp09
    Can you not put a pagefile on a secondary (non-windows) drive (as a second pagefile; from what I understand windows forces you to have at least a small one on your primary windows installation drive)? The virtual memory manager lets you set one up but it doesn't persist between restarts (at least for me). @Winterlord I would say no, unless you really need that drive space.
    Reply
  • USAFRet
    20903498 said:
    should i disable the page file with 16gb of ram would that improve performance at all

    No.
    You need some pagefile.
    Reply
  • USAFRet
    20903508 said:
    Can you not put a pagefile on a secondary (non-windows) drive? The virtual memory manager lets you set one up but it doesn't persist between restarts (at least for me). @Winterlord I would say no, unless you really need that drive space.

    You can, but it serves no purpose.

    You have to balance how much RAM you have vs the drive space, etc.

    For instance...
    Years ago, I had a 120GB SSD for the boot drive and 16GB RAM.
    Letting Windows suck up 8GB or more for the pagefile was unacceptable, due to the small SSD.
    So I set it at 1GB min/max. Worked just fine.

    Now, I have 32GB RAM and a 500GB SSD C drive. Only recently did I change from that original 1GB, to letting Windows manage it. The required drive space is not so much of a matter.

    If you have an SSD for the C drive, you really want the page file on that.
    In the event the OS needs to use the pagefile, why cripple the system by having that on an HDD secondary drive?
    Reply
  • ex_bubblehead
    20903508 said:
    Can you not put a pagefile on a secondary (non-windows) drive (as a second pagefile; from what I understand windows forces you to have at least a small one on your primary windows installation drive)? The virtual memory manager lets you set one up but it doesn't persist between restarts (at least for me). @Winterlord I would say no, unless you really need that drive space.
    Yes, better paging performance can be achieved by placing a paging file on each physical hard drive. The page file on the least busy drive at the time of the paging operation will be used.

    Note: This applies to spinning drives. SSD's are fast enough that only one page file is needed.
    Reply