How to Change Pagefile Size and Location in Windows

Spread the love

Every now and then, you will see an Internet-recommended fix asking you to change the location and/or size of the pagefile or the pagefile.sys file on your Windows PC. The pagefile is part of your system’s virtual memory, used by Windows to extend the available memory for day-to-day tasks. If you know why you’re being asked to do it, follow this guide to change the pagefile size and location in Windows.

Tip: read on to learn how to fix the “page fault in nonpaged area” error in Windows

Content

Change Pagefile Size in Windows

When Windows runs low on physical memory (RAM), it accesses the pagefile.sys system file and dumps all the least-used memory bits into that file. The system can clear up the physical RAM for any additional tasks. Windows automatically manages the pagefile size by default, so make changes only if you absolutely need to. Windows typically reserves around 1/8 of your total RAM or 4GB (whichever is larger) on your hard drive for the pagefile.

Follow the steps below to change the pagefile size:

Right-click the Windows button, select System, then Advanced system settings.

Under Performance in the Advanced tab, click Settings.

Under Virtual memory in the Advanced tab, click Change. Uncheck Automatically manage paging file size for all drives in the Virtual Memory window, select the paging file drive, and click the radio button next to Custom size. Enter the Initial size and Maximum size values for your pagefile, and click OK to save the changes.

It’s best to restart your system for the changes to take effect. Additionally, if you face high memory usage errors in Windows, try increasing the virtual memory further, although this may not completely fix the issue on its own.

Tip: need some more space? Learn how to clean up and make space on your Windows C drive.

Change Pagefile Location in Windows

To change the pagefile location, follow the steps above until the Virtual Memory window opens, then uncheck the box next to Automatically manage paging file size for all drives. Select the default paging file drive, click the radio button next to No paging file, and click Set to effectively disable the paging file on the drive you selected.

Select the drive where you want to store the paging file, then click the radio button next to System managed size, and click Set to apply the changes. Click OK and close all the windows.

Restart your system for the changes to take effect.

Manage Pagefile in Windows

Changing pagefile size and location is fairly easy, whichever Windows version you’re on, and it is particularly helpful when resolving errors related to virtual memory. That being said, you should only change the paging file settings if you are 100 percent sure why you’re doing it. Otherwise, it’s best to let Windows manage the pagefile automatically. Also learn what to do if Windows Start Menu Search isn’t working.

All images and screenshots by Tanveer Singh.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time. Subscribe


Tanveer Singh

After a 7-year corporate stint, Tanveer found his love for writing and tech too much to resist. An MBA in Marketing and the owner of a PC building business, he writes on PC hardware, technology, video games, and Windows. When not scouring the web for ideas, he can be found building PCs, watching anime, or playing Smash Karts on his RTX 3080 (sigh).

Leave a comment