- 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 computing-intensive applications: Windows 10 and Windows 11 use the swap file to improve your PC performance - and prevent crashes caused by an overloaded RAM.
This hidden system file is the "smart" system of the virtual memory:
When the physical RAM is running low or should simply be unloaded, the system management of Windows 11 and 10 automatically decides which files and programs should be moved to the Swap file (pagefile.sys) can be outsourced.
This can be caused, for example, by many complex applications or games being opened at the same time.
But not only when your RAM is full and the system is about to crash, at any time, even if the working memory is not fully utilizedthe swap file in Windows 11 and 10 jumps in and saves excess data. Always focused on 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 swap file in Windows 11 and 10?
And why do we advise you, unlike with earlier Windows versions, not to set a user-defined size prematurely under Win 11 and Win 10?
Increase and optimize the swap file in Windows 10 / 11
Let's start right away with the Manual setting of the swap file:
Changing, moving and increasing the swap file in Windows 10 and 11 can be done quickly and easily via the Advanced system settings.
Risky tips in online guides and chatGPT / AI chatbots
Many Internet guides give hair-raising recommendations for the swap file. Also ChatGPT 4 advised me to make risky changes in testswhich would lead to crashes in Windows 11 / 10, especially for power users in areas such as gaming and video editing. See example of 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 on the tab Extended and then under Performance on Settings.
- Go again to Extended and click under Virtual memory on Change.
- In the next window, remove the checkmark next to Manage file size for all drives automatically.
Now you can make a Custom size of the swap file and set its Storage location or the drive according to your needs.
Here are all the steps for the settings as a picture 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 spaceIf the Windows installation drive (C:) is too small, move the swap file to a drive with more storage space (select the storage location in the above settings, see images). Otherwise the file size could lead to "filling up" of the system partition or hard disk and to system crashes.
- Increased memory requirement: For high memory usage (such as 4K video editing and 3D games), it may make sense to increase the file size to >100GB or an additional swap file on another drive.
- Acute lack of storage space: If the swap file is too large and the disk space on your system partition is small, you could theoretically set a smaller, user-defined size (CAUTION: In practice, this can lead to sudden crashes later on with memory-intensive applications! Our recommendation: If possible move them to a larger drive as mentioned above or let Windows 11 / 10 continue to manage them).
- TroubleshootingIf the error "BSOD PAGE_FAULT_IN_NONPAGED_AREA", "KERNEL_DATA_INPAGE_ERROR" or a memory shortage occurs, increasing the swap file size may be necessary. Or a user-defined size that is too small has been set - and switching to automatic file size provides a remedy.
But Which swap file size is sufficient and recommendable?
Recommended size of the swap file for 8GB, 16GB, 32GB and 64GB RAM
You want to change the swap file size not be managed by Windows 11 or Windows 10, but a Custom size specify?
Here are a few rules of thumb:
- Initial size and maximum sizeAlways set identical values, see image above. Different sizes are not good, as the dynamic enlargement or reduction of the swap file requires more computing time and places an unnecessary load on the hard disk. That is why I have always recommended enter the same values in megabytes in both fields (nothing has changed since Win XP ;).
- With less than 8 GB RAM working memory: Set the swap file to at least 1.5 - 3 times your RAM. With 6GB RAM, this means 9,000 megabytes or more (the more performance-hungry your processes, the more MB are required). As mentioned, the Initial size and maximum size identical to protect the hard disks (especially important for SSDs, see also section below).
- With 8 GB RAM, 16 GB RAM, 32 GB or even more: The virtual RAM should be about the same size as your physical RAM. EXCEPTIONS: For high resource consumption such as video editing, even 64GB RAM can be used. an increasing of the swap file in Windows 11 and 10 to 100 GB or more to be able to work smoothly.
- If you store large amounts of data on your hard disk: Always give 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 disk.
- To select the drive, on which the swap file should be located: If you have multiple disks in your computer, take the faster and bigger oneso that quick access to the file is guaranteed in the event of memory bottlenecks and the file does not grow.
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:
"RecommendationAs a starting point, a 32 GB swap file would be a reasonable choice for your system. This will ensure that you have enough memory for most applications and for system stability. (...) For most modern systems with plenty of RAM (as in your case), it is often sufficient to set the swap file to the same size as the physical memory. In your case, that would be 32 GB." (December 2023)
But would this size be suitable for you and your system really Sufficient? Permanently?
Well, in the case of of this Adobe Premiere user it was still too small at 32 GB: he had reduced the swap file from 90 GB to 16 GB due to a lack of storage space on the system partition.
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 writes here on the risk of too small a swap file size under Win 10:
"This condition can lead to freezing, crashing and 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:
- DisadvantagesDeactivating the swap file will almost certainly lead to instability: Crashes, freezes of apps or the entire operating system (see example above). Even if it continues to run initially, everything could quickly slow down, as Windows and individual apps rely on the virtual memory, not just when the RAM is full.
- AdvantagesTheoretically, you could save memory by deactivating it. If you have a large amount of RAM and do not use memory-intensive applications. But the risk of system or app crashes is high - and this advantage 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 the System settings and select Advanced system settings.
- Click on the Extended-tab and then under Performance on Settings.
- In the next window, select Extended and then under Virtual memory > Change.
- Remove the tick from Manage drives automaticallyselect your drive and set the option to No swap file.
- Confirm with OK and 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.
But you can still use a few tips to optimize your virtual memory for Less fragmentation and write operations on your SSDs and hard disks configure.
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 initial size and maximum size equalThis prevents the swap file from constantly changing its size, which increases fragmentation and can put a strain on the SSD and slow down normal HDD hard disks.
- Move the swap file to a larger HDD: Is the swap file on your SSD too large and is there a lack of memory? Then move it to a larger drive (to which Windows 11 / 10 should have continuous access).
- Not too big, not too smallA swap file that is too large wastes valuable SSD storage space, one that is too small could impair performance. A good starting point is 1.5 to 3 times your RAM.
- Monitoring performanceObserve how your system behaves. If you notice that it is getting slower, it might be time to adjust the swap file size.
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 they have a hidden is a 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: There are also the hiberfil.sys (saves the entire RAM memory during sleep mode) and swapfile.sys (for Microsoft apps since Win 8), 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 swap file sizeWindows 11 uses a more dynamic system to adjust the size of the swap file. It actively assesses memory requirements and adjusts the size of the swap file to find the best compromise between system performance and available disk space.
- Improved memory managementThe Windows 10 successor has more efficient memory management that interacts better with physical RAM and the swap file. This includes improved memory usage algorithms that help to make the swapping of data between RAM and hard disk more efficient.
- Optimization for SSDsWin 11 is optimized to work more efficiently with solid-state drives (SSDs). The swap file management takes into account the faster read and write speeds of SSDs to speed up the swapping of data and at the same time reduce wear and tear on the SSD.
- Improved algorithm for storage pressureCompared to previous versions, Win 11 uses an improved algorithm to monitor memory pressure. If the system detects that the physical RAM is running low, it uses the swap file more efficiently to prevent a drop in performance.
- Integration with new technologiesMicrosoft has geared Win 11 towards integration with newer technologies such as DirectStorage for games and other memory-intensive applications. This integration ensures better utilization of virtual memory in conjunction with 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 friendIt helps your PC to run smoothly even under high load by relieving the RAM.
- Size is importantThe optimal size of the swap file depends on your RAM and your system usage. As a rule of thumb, only change the size if there are problems. It should be at least 1.5 times the size of your RAM, although for computing-intensive processes such as video editing, sizes in excess of 100 GB may be useful. And: The initial size and maximum size should always have identical values.
- Attention SSD usersWith SSDs, you should make sure that the swap file is not too large so as not to shorten the service life of your SSD.
- Take care when deactivatingDeactivating the swap file involves risks. Check carefully whether deletion 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 won't stop!