- Crashes & freezes: The swap file works as virtual RAM in Windows 10 / 11 and can cause problems with your PC performance.
- Adjust & set size: Get simple instructions on how to increase and set your swap file in the Advanced system settings if the automatic management by Windows 11 or Windows 10 is not sufficient, for example for gaming and video editing.
- Risky deactivation & downsizing: Prevent a swap file that is too small or deactivated from slowing down or crashing your PC.
- SSD tips: Benefit from fast SSDs and avoid unnecessary hard disk fragmentation.
Quick overview:
What is the swap file in Windows 10 & Windows 11?
No stuttering—everything runs smoothly despite many computationally intensive applications: Windows 10 and Windows 11 use the paging file to improve your PC's performance—and prevent crashes caused by overloaded RAM.

This hidden system file is the "smart" system of the virtual memory:
When physical RAM becomes scarce or simply needs to be freed up, the system management in Windows 11 and 10 automatically determines which files and programs will be moved to the page file (pagefile.sys).
This can be caused, for example, by many complex applications or games being opened at the same time.
But it's not just when your RAM is full and a system crash is imminent—even when your RAM isn't fully utilized—that the paging file in Windows 11 and 10 steps in from time to time to store excess data. It's always working to ensure stable, smooth computing performance.
It is the invisible performance heroine of Windows.
It works in the background to ensure that everything runs smoothly and without delays.
How and when should you change the page file in Windows 11 and 10?
And why do we advise you—unlike with earlier versions of Windows—not to rush into setting a custom size in Windows 11 and Windows 10?
Increase and optimize the swap file in Windows 10 / 11
Let's start right away by manually configuring the paging file:
You can quickly and easily change, move, or increase the size of the paging file in Windows 10 and 11 using the advanced system settings.
Risky tips in online guides and chatGPT / AI chatbots
Many online guides offer outrageous recommendations regarding the paging file. Even ChatGPT 4 advised me during tests to make risky changes that would cause Windows 11/10 to crash, especially for power users in areas such as gaming and video editing. See the example from an Adobe Premiere user below.
Please read our recommendations and the effects of manual configuration and sizing in advance.
4-step guide to changing the swap file (size and drive)
Here is a quick guide:
- In Windows 11 or 10, open the advanced system settings.
- Click the Advanced tab, and then, under Performance, click Settings.
- Go back to "Advanced" and click "Change" under "Virtual Memory.".
- In the next window, uncheck the box next to "Automatically manage file size for all drives.".
Now you can set a custom size for the page file and customize its location or drive to suit your needs.
Here are all the steps for configuring the settings in a photo gallery:
When should I increase the size and manually change the swap file in Windows 11 / 10?
Are you thinking about increasing the size of the Windows 11 / 10 swap file or setting it manually?
This is possible, but you should know:
Microsoft's operating system now manages the virtual memory reliably and automatically.
A lot has changed since earlier versions: The virtual ram calculation runs much more intelligently under Win 10 than it did under XP. With Windows 11, there has been another leap forward.
As a Windows expert, I recommend today (as do other specialists and MVPs) that most users use the automatic handling by the system and not “play around” with it.
Now comes the big "but"...
Sometimes a manual adjustment of the size and moving nevertheless be necessary:
- Optimize storage space: If the Windows installation drive (C:) is too small, move the paging file to a drive with more storage space (select the location in the settings mentioned above; see images). Otherwise, the file size could cause the system partition or hard drive to become "full" and lead to system crashes.
- Increased memory requirements: When RAM usage is high (such as during 4K video editing and 3D gaming), it may be a good idea to increase the file size to more than 100 GB or set up an additional paging file on a different drive.
- Acute lack of disk space: If the paging file is too large and there is little disk space on your system partition, you could theoretically set a smaller, custom size (CAUTION: In practice, this can lead to sudden crashes later on when running memory-intensive applications! Our recommendation: If possible, move it to a larger drive as mentioned above, or let Windows 11/10 continue to manage it).
- Troubleshooting: If you encounter the "BSOD PAGE_FAULT_IN_NONPAGED_AREA" or "KERNEL_DATA_INPAGE_ERROR" error, or if you run out of memory, you may need to increase the size of the paging file. Alternatively, a custom size that is too small may have been set—in which case, switching back to the automatic file size setting will resolve the issue.
But what is an adequate and recommended page file size?
Recommended size of the swap file for 8GB, 16GB, 32GB and 64GB RAM
Would you rather set a custom size for the paging file instead of letting Windows 11 or Windows 10 manage it?

Here are a few rules of thumb:
- Initial Size and Maximum Size: Always set them to the same values; see the image above. Different sizes aren't a good idea, because dynamically increasing or decreasing the size of the paging file takes more processing time and puts an unnecessary strain on the hard drive. That’s why I’ve always recommended entering the same values in megabytes in both fields (this hasn’t changed since Windows XP ;).
- If you have less than 8 GB of RAM: Set the swap file to at least 1.5 to 3 times the size of your RAM. So, for 6 GB of RAM, that would be 9,000 megabytes or more (the more resource-intensive your processes are, the more MB you’ll need). As mentioned, the initial size and the maximum size should be identical to protect your hard drives (especially important for SSDs; see also the section below).
- Whether you have 8 GB, 16 GB, 32 GB, or even more RAM: Your virtual RAM should be about the same size as your physical RAM. EXCEPTIONS: For resource-intensive tasks such as video editing, even with 64 GB of RAM, it may be advisable to increase the page file in Windows 11 and 10 to 100 GB or more to ensure smooth performance.
- If you store large amounts of data on your hard drive: Always leave it enough space to "breathe." Because once the swap file is fully occupied by the system, there should still be enough free space on the hard drive.
- To select the drive where the paging file should be located: If you have multiple hard drives in your computer, choose the faster and larger one to ensure quick access to the file in case of memory shortages and to prevent problems as the file grows.
Reducing the size of the swap file - at what risk?
Wondering whether you should shrink a large swap file?
For example, because pagefile.sys has swollen to a gigantic 90 gigabytes? And it's almost bursting your hard disk or Windows system partition?
And you have a whopping 32 GB of RAM in your computer?
Using the instructions above, you could now set a sufficient user-defined size, say 32 GB (i.e. 32,000 MB), and fix the problem in a few seconds.
To be on the safe side, you could ask ChatGPT for advice...
AI chatbot ChatGPT 4 gave me the following advice for downsizing:
""Recommendation: As a starting point, a 32 GB swap file would be a reasonable choice for your system. This ensures that you have enough memory for most applications and for system stability. (...) For most modern systems with ample RAM (as in your case), it is often sufficient to set the page file to the same size as the physical memory. In your case, that would be 32 GB." (December 2023)
But would that amount really be enough for you and your system? In the long run?
Well, in the case of this Adobe Premiere user, 32 GB was still too small: Due to a lack of storage space on the system partition, he had reduced the size of the swap file from 90 GB to 16 GB.
After some time, mysterious Windows crashes occurred during video editing and when exporting a 4k video.
In his use case, a size of 90 GB was entirely appropriate: As the user later measured and described in his interesting field report, 109 GB was actually necessary.
Microsoft itself has this to say about the risk of setting the paging file size too small in Windows 10:
"This condition can cause the system to freeze, crash, or experience other malfunctions."
According to this official documentation, swap files managed by the operating system in Win 10 automatically become up to three times as large as the physical memory (installed RAM) or 4 GB (always the higher value, but a maximum of 12.5 percent of the hard disk size) when the reserved memory reaches 90 percent of the reserved memory limit.
Reducing the size of the swap file using a user-defined size should therefore be carefully considered.
Deactivate: Should I delete the swap file in Windows 10 / 11?
Disabling Windows 10's swap file can sound tempting, especially if you think your PC has enough RAM.
But wait!
What could the consequences be?
Disadvantages and advantages of deactivation
Before you take this step, let's briefly weigh up the disadvantages and advantages:
- Disadvantages: Disabling the paging file will almost certainly lead to instability: crashes, apps freezing, or the entire operating system freezing (see example above). Even if everything continues to run at first, performance could quickly slow down, since Windows and individual apps rely on virtual memory—not just when the RAM is fully utilized.
- Advantages: In theory, you could save storage space by disabling this feature—if you have a large amount of RAM and don't use memory-intensive applications. However, the risk of system or app crashes is high—and this benefit is negligible.
Instructions for deactivating the swap file (NOT recommended)
We strongly recommend that you do not deactivate the swap file - some applications will no longer work after deletion. Crashes may occur.
If for some reason you decide to try it anyway, here are instructions on how to deactivate it:
- Go to System Preferences and select Advanced System Preferences.
- Click the "Advanced" tab, and then click "Settings" under "Performance.".
- In the next window, select "Advanced," and then, under "Virtual Memory," select "Change.".
- Uncheck the "Automatically manage drives" box, select your drive, and set the option to "No paging file.".
- Click OK to confirm, then restart your PC.
But remember: the file has now been deleted. Observe the performance of your PC after deactivating it. If you notice any problems, it is better to reactivate the swap file.
In most cases, it is an important part of your Windows 10/11 system that helps to ensure stable performance.
Swap file on SSDs (with less fragmentation and write operations)
If you have an SSD in your Windows 10 or Windows 11 computer, there are a few things you should know.
This is because the swap file configuration can affect SSD and hard disk fragmentation, speed and durability.
Consider the service life of your SSD
SSDs are faster than traditional hard disks, but they also have their peculiarities: When swapping files to an SSD, it is important to find a balance between performance and longevity.
Too much write and read activity can shorten the service life of your SSD.
It is true that SSDs are much more robust today than they were a few years ago.
Still, with a few tips, you can configure your virtual memory to reduce fragmentation and write operations on your SSDs and hard drives.
Optimization of the swap file for SSD & HDD
Here are some quick tips on how to optimize the swap file on an SSD for maximum performance and durability:
- Set the minimum and maximum sizes to the same value: This prevents the swap file from constantly changing size, which increases fragmentation and can put a strain on SSDs and slow down standard HDD drives.
- Move the paging file to a larger hard drive: Is the paging file on your SSD too large and causing a storage shortage? If so, move it to a larger drive (which Windows 11/10 should have constant access to, however).
- Not too big, not too small: A swap file that’s too large wastes valuable SSD storage space, while one that’s too small could affect performance. A good starting point is 1.5 to 3 times the size of your RAM.
- Monitoring Performance: Keep an eye on how your system is performing. If you notice that it's slowing down, it might be time to adjust the size of the swap file.
With these simple steps you can ensure that your SSD or HDD and the swap file work in perfect harmony.
How to get the most out of your Windows 10 operating system with fast solid state drives.
Storage location: Here you can find the swap file in Windows 10 and Windows 11
The file name of the swap file is Windows 10 and Windows 11 "pagefile.sys" and its storage location is by default on the drive on which the operating system is installed.
In most cases, this is the "C" drive.
The full file path of your swap file is therefore probably as follows:
C:\pagefile.sys
Note that it is a hidden system file.
To see them in Windows Explorer, you must change the Explorer display options so that hidden files and protected system files are displayed.
This can be set in the Explorer options under "View" or "Folder options". As soon as these options are activated, you should be able to see the pagefile.sys in the source directory of the C: drive.
PS: The hiberfil.sys (saves the entire RAM memory during hibernation) and swapfile.sys (for Microsoft apps since Win 8) are also located there, but with different functions.
Differences in swap file management in Windows 11 and Windows 10
How does the handling of the swap file differ between Windows 11 and Windows 10?
In fact, the basic principles are quite similar. However, Windows 11 brings some improvements and smarter management strategies for the swap file compared to previous versions of Windows, including Windows 10. For users with powerful systems and SSDs, this can be an advantage.
Here are a few technical details and innovations that have been implemented in Windows 11:
- Adaptive Page File Size: Windows 11 uses a more dynamic system to adjust the size of the page file. It actively assesses memory requirements and adjusts the size of the page file to find the best balance between system performance and available disk space.
- Improved memory management: The successor to Windows 10 features more efficient memory management that interacts better with physical RAM and the paging file. This includes improved memory usage algorithms that help make the swapping of data between RAM and the hard drive more efficient.
- Optimization for SSDs: Windows 11 is optimized to work more efficiently with solid-state drives (SSDs). Page file management takes into account the faster read and write speeds of SSDs to speed up data paging while reducing wear on the SSD.
- Improved Algorithm for Memory Pressure: Compared to earlier versions, Windows 11 uses an improved algorithm to monitor memory pressure. When the system detects that physical RAM is running low, it uses the paging file more efficiently to prevent a drop in performance.
- Integration with New Technologies: Microsoft has designed Windows 11 to integrate with newer technologies such as DirectStorage for games and other memory-intensive applications. This integration ensures more efficient use of virtual memory in conjunction with the physical hardware.
Summary
We've covered a lot, but here are the key points you should take away to improve your PC performance in Windows 10:
- The swap file is your friend: It helps your PC run smoothly even under heavy load by taking some of the strain off the RAM.
- The swap file is your friend: It helps your PC to run smoothly even under high load by relieving the RAM.
- SSD users take note: With SSDs, you should make sure that the swap file is not too large so as not to shorten the service life of your SSD.
- Caution when deactivating: Deactivating the swap file involves risks. Check carefully whether deleting it makes sense for your system.
FAQ
Here we answer some of the most frequently asked questions about the swap file in Windows 10 so that you can improve your PC performance quickly and effectively.
Pictures above: Screenshots
On Windows Tweaks you will find time-saving tech guides for PC, software & Microsoft. For a stress-free digital everyday life. Already We have been tweaking Windows since 1998 and just don't stop!












