RAM and an SSD inside a Windows PC laptop.
Jason Fitzpatrick / How-To Geek
The Windows page file stores data when there's no room for it left in your computer's RAM. It's a hidden system file located at C:\pagefile.sys by default. The page file is often called "virtual memory," while your computer's RAM is referred to as "physical memory."

Windows uses a page file to store data that can’t be held by your computer’s random-access memory when it fills up. While you can tweak the page file settings, Windows 10 and Windows 11 can manage the page file just fine on their own.

What Is the Page File?

The page file is a hidden system file used by the Windows operating system. Windows stores data in this file when your computer’s RAM fills up. The page file is often called “virtual memory” to distinguish it from RAM, which is “physical memory.”

Also known as the swap file, pagefile, or paging file, the page file is located at C:\pagefile.sys by default, but it’s hidden by default. You won’t see it unless you tell File Explorer to show protected operating system files. You may also have multiple paging files on different drives if your computer has multiple drives.

Windows may move data your computer isn’t using from RAM to the page file to free up space in your RAM pre-emptively. This all happens automatically in the background.

All versions of Windows have the page file. It’s present on Windows 10 and Windows 11, and you’ll also find it on older versions of Windows like Windows 7 and Windows XP. The good news is that your page file will perform more quickly on a modern PC with a speedy NVMe drive or another type of SSD than an older, slower mechanical hard drive.

Macs running macOS and Linux systems use “swap” space rather than a page file. The page file is the Windows version of a swap file. (On a Mac, a “Pages” file is a document created by iWork. Pages is a word processor created by Apple—think of it like Apple’s Microsoft Word competitor.)

Note: The Windows page file is occasionally misunderstood. People sometimes see it as the cause of slowdowns because it’s slower to use the page file than your computer’s RAM, but having a page file is better than not having one.

The pagefile.sys file under C:\ on Windows 11 in File Explorer.

How the Page File Works (and Why You Need It)

Your computer stores files, programs, and other data you’re using in your RAM (random access memory) because it’s much faster to read from RAM than it is to read from a hard drive or even an SSD. For example, when you open Google Chrome, Chrome’s program files are read from your computer’s storage and placed into your RAM. The computer uses the copies in RAM rather than repeatedly reading the same files from your SSD or hard drive.

Programs store the data they’re working with here. When you view a web page, the web page is downloaded and stored in your RAM. When you watch a YouTube video, the video is held in your RAM.

When your RAM becomes full, Windows moves some of the data from your RAM back to your system’s storage, placing it in the page file. While writing this data to your storage and reading it back later is much slower than using RAM, it’s backup memory. Rather than throwing potentially important data away or having programs crash, the data is stored on your SSD or hard drive.

Windows will try to move data you aren’t using to the page file. For example, if you’ve had a program minimized for a long time and it isn’t doing anything, its data may be moved from RAM to your page file. If you maximize the program later and notice that it takes a while to come back instead of instantly snapping to life, it’s being swapped back in from your page file. If your computer has a storage indicator light, you’ll see the light blinking as this happens. However, with modern computers and fast SSDs, it might happen so fast you don’t even notice.

If your computer has enough RAM, it shouldn’t be using the page file a lot in typical use. If programs start to slow down when you have a large number of them open—or when you have a lot of browser tabs open—that’s an indication your computer may be using the page file. If your computer’s RAM appears nearly full, you may be able to speed things up by adding more RAM. You can also try freeing up memory — for example, by closing programs you aren’t using.

You can see how much RAM is in your computer and how full it is from the Resources tab in the Windows Task Manager.

The Windows 11 Task Manager showing current memory usage.
In the screenshot above, our PC is only using 10.7 GB of 15.5 GB available RAM. It has plenty of available RAM left at the moment.

Myth: Disabling the Page File Improves Performance

Some people will recommend disabling the page file to speed up your computer. The thinking goes like this: the page file is slower than RAM, and if you have enough RAM, Windows will use the page file when it should be using RAM, slowing down your computer.

This isn’t really true. People have tested this theory and found that, while Windows can run without a page file if you have a large amount of RAM, there’s no performance benefit to disabling the page file.

However, disabling the page file can result in some bad things. If programs start to use up all your available memory, they may start crashing instead of being swapped out of the RAM into your page file. This can also cause problems when running software that requires a large amount of memory, such as virtual machines, media creation applications, and demanding PC games. Some programs may even refuse to run.

In summary, there’s no good reason to disable the page file — you’ll get some storage space back, but the potential system instability won’t be worth it.

Note: It’s true that SSDs have a limited lifespan—a fixed number of writes before they can no longer be written to. Some people choose to disable the page file for this reason, to prolong SSD lifespan. However, modern SSDs can take so many writes that we don’t think this is a big concern. It will likely be time to replace your computer long before the SSD fails. (Unless Windows is writing a lot to the page file—in which case, there’s a good chance you will want that faster performance from the page file anyway.)

How to Manage the Page File on Windows 10 or Windows 11

Windows automatically manage the page file’s settings for you by default. We recommend sticking with the default settings.

However, if you want to adjust settings like your page file’s size or location, you can do so from the Advanced System Settings window. To launch it, open the Start menu and type  “Advanced System Settings” into the Start menu. Click “View Advanced System Settings” or just press Enter to open it.

Launch the "View advanced system settings" Control Panel shortcut.

Click the “Settings” button under the Performance section.

Click over to the “Advanced” tab in the Performance Options window. Click the “Change” button in the “Virtual memory” section.

Since Windows automatically manages your page file settings by default, the options here will by grayed out. We recommend sticking with the default options. With the System Managed Size option, Windows will automatically choose a good size for the page file.

To configure these options yourself, uncheck “Automatically manage paging file size for all drives.” You can then select each drive in your computer (if it has multiple drives) and, for each, choose between a “Customize Size” you can configure, “System Managed Size,” and “No Paging File.” After changing the settings for a drive, click “Set” to save your changes.

If you set a drive to “No Paging File,” Windows will delete the Pagefile.sys file.

Virtual Memory settings on Windows 11.

How to Speed Up the Windows Page File

For maximum performance, be sure your page file is located on your computer’s fastest drive. For example, if your computer has both a slower mechanical hard drive and a faster solid-state drive, you’ll want the paging file on your SSD to ensure writing to it and reading from it is as fast as possible.

In most situations, this should hopefully be the default—you probably want to keep your Windows system files on your fastest drive to ensure the operating system is nice and speedy, for example. In this case, the default location on your C: drive will work well.

If you have several drives in your computer and they’re a similar speed, assuming one is the system drive with your programs installed on it and one is a less-used data drive, moving the page file to the data drive can potentially offer some increased performance when your page file is in-use. Assuming that Windows will already be using the system drive if it needs to use the page file, this spreads out the read-write activity instead of concentrating it on one drive.

However, this will help the most if your computer is frequently using its page file. If that’s the case, you can get a bigger performance improvement by upgrading your PC’s RAM.

Warning: Be sure to keep the page file on your fastest drive! For example, many computers now have a speedy SSD as a system drive and a slower mechanical hard drive as a secondary data drive. In this case, you should definitely leave your page file on the fast SSD and not move it to a slower hard drive.

Note that this will only help if you actually have two separate physical drives in your computer. If you have one SSD or hard drive separated into multiple partitions, each with its own drive letter, this won’t do anything. Whether it’s partitioned or not, it’s still the same physical drive.

What Are Swapfile.sys and Hiberfil.sys?

Windows also stores Swapfile.sys and Hiberfil.sys files alongside the Pagefil.sys file.

The Swapfile.sys file is very small (on our Windows 11 PC, ours was just 16 MB as opposed to the 16 GB page file.) It’s used for some other purposes, especially those related to “universal” apps on modern versions of Windows.

When you disable the page file on a drive using the options in Advanced System Settings, Windows 10 and Windows 11 will also delete the Swapfile.sys file.

The Hiberfile.sys file is used for hibernating your PC. Hibernating is an alternative to sleep mode that uses no power. In sleep mode, your computer saves its data to RAM and uses a small amount of electricity to power the RAM and maintain the data. It can then turn on very quickly when you start using it again, restoring the last state you used it in. In hibernation mode, your computer saves the state of its ram to the Hiberfile.sys file on its storage and shuts down. It can then use no energy—this is particularly great for laptops, as the battery won’t drain. When you boot up the computer again, it can restore the state it was in complete with all your open applications by loading it from the Hiberfile.sys file. Of course, this is slower than simply restoring it from RAM.

Computers—especially laptops—often go to sleep and then, after spending a while in sleep, go into hibernation mode to save additional power. The only way to delete the Hiberfile.sys file is by disabling hibernation mode on your PC.

In summary, the page file is an essential part of Windows 10 and Windows 11. Even if it’s rarely used, it’s important to have it available when programs use an unusually large amount of memory.

Having a page file won’t slow down your computer—but ,if your computer is using its page file a lot, you should probably get some more RAM.

RELATED: What Is the .GamingRoot File on Windows?

Profile Photo for Chris Hoffman Chris Hoffman
Chris Hoffman is Editor-in-Chief of How-To Geek. He's written about technology for over a decade and was a PCWorld columnist for two years. Chris has written for The New York Times and Reader's Digest, been interviewed as a technology expert on TV stations like Miami's NBC 6, and had his work covered by news outlets like the BBC. Since 2011, Chris has written over 2,000 articles that have been read more than one billion times---and that's just here at How-To Geek.
Read Full Bio »