Computers are pretty fast these days, and the latest operating systems do a pretty good job of it. Gone are the days when most tech-savvy Windows users performed the annual “format and reinstall” ritual. This does not mean that your new version of Windows 10 will remain fast forever.
Some users may notice that if they open an alternate tab in a video game or switch between popular applications such as video editors or 100 tab browser windows, everything stops. This is a sign that you’ve run out of super-fast RAM installed on your computer and now Windows is forced to rely on much slower additional storage as an overflow.
The slowdown you see occurs when Windows swaps information from your RAM chips into an overflow area known as the “paging file”.
You can improve performance by optimizing the paging file in Windows 10.
What is a “paging file” anyway?
Before we get into how to optimize the paging file, let’s dive deeper into what it is. If you’ve configured Windows Explorer to show hidden system files, you’ll find it in the root of your C drive named pagefile.sys. Assuming your computer has a default configuration.
The paging file is of a reserved size and is internally divided into “pages”. It is a data format that stores RAM data for any operating system that uses RAM swapping as a method of memory management.
“Pages” are blocks of information, each with a unique address and the same size. The software on your computer keeps a record of which pages contain this information, so when it needs that information, it requests a page from Windows.
When your applications require more RAM than your computer has, it needs to use “virtual memory”, which is the paging file. From the point of view of the application, it’s just more RAM. The only difference is that reading information from the hard disk is much, much slower than RAM. This is, rather, the point of having RAM!
So if the paging file is so slow, why bother with it? Without the paging file, your applications will crash or malfunction because any additional information that needs to be stored in RAM will simply be lost. It is better to slow things down a little to cope with peak RAM requirements than to just crash the entire system.
Okay, but why should the paging file be improved?
Swapping RAM is one of the oldest memory management methods in existence. This was used by mainframes in the 1960s! This made a lot of sense when RAM was measured in tens of kilobytes. It still made sense when 640KB of memory was “enough for everyone.”
Most regular computers these days have a lot more RAM than a user might need, unless they run memory-intensive applications. If you are constantly running low on RAM due to daily use, a much better strategy for solving the problem is to add more RAM to the system.
Like most computer components these days, RAM is relatively cheap!
Given that your computer has the required amount of RAM, there may still come a day when something requires swapping RAM. At this point, you will be grateful that you were smart enough to make sure that flipping through the pages does not take longer than necessary.
General tips to improve migration performance
Aside from tweaking the native Windows management settings, there are several things you can do to improve the performance of RAM swapping when it does. One of the most common advice is to install the paging file on a drive other than the operating system drive.
The point is that most new computers these days have a solid state drive (SSD) as their primary drive. Although SSDs using the SATA interface still have to queue read and write requests sequentially, they are orders of magnitude faster than mechanical drives with spinning platters.
The logic behind this makes sense, since hard drives have to queue read and write requests. The read / write heads must physically travel to different parts of the disk where data is stored. Therefore, if Windows tries to replace information from your paging file, and also tries to use the disk for other purposes, it will all slow down before scanning. If you put the paging file on a separate hard drive, this problem goes away.
Therefore, if you have two SATA SSDs in your computer, then it still makes sense to place the paging file on an additional drive. However, if you have a primary drive that uses an NVMe over PCIe interface, you won’t get anything by moving the paging file. This is because NVMe over PCIe runs in parallel, which means read and write requests are processed at the same time.
On mechanical hard drives, fragmentation can also be a problem. The files are not permanently stored, but are written to any free space left by the deleted files. This means that over time, as files are written and deleted, a particular file may exist piecemeal throughout the disk.
If the paging file is physically scattered throughout the disk, it will take longer for the disk heads to bring everything together. For solid state drives, this is not a problem. If you are using a mechanical disk, creating a dedicated partition after the first defragmentation of the disk in question may be a good way to deal with this problem. By placing the paging file on a defragmented partition, you ensure that all your data is physically in one place.
How to Improve the Windows 10 Paging File
Now that you have a good understanding of the context and rules for optimizing the paging file, it’s time to actually explore the settings themselves. It is up to you to decide which specific settings to use based on your specific configuration.
- First open the Start menu and then type “performance” in the search bar.
- Take a look to customize the appearance and performance of Windows in the settings category as shown in the screenshot below.
- The Performance Options window should open. Click on the “Advanced” tab.
- With the Advanced tab open, click Change in the Virtual Memory section.
- A virtual memory window will open. All options are disabled by default. Therefore, first we need to uncheck “Automatically manage paging file size for all drives”.
- You will now see the following options that you can change.
- The settings for each disk can be controlled independently. Click the desired drive in the window above to change its specific settings. The logical partitions will also appear as independent disks.
- Select Custom Size to specify your own minimum and maximum paging file size. Select “No paging file” if you don’t want it on a specific drive at all.
- By default, the minimum size is automatically set to 1.5 times the actual amount of RAM. We do not recommend that you choose a minimum size below this. Once you have configured a particular drive the way you like, be sure to hit the “Install” button to lock that selection.
How to improve the paging file in older versions of Windows
The way virtual memory is configured and managed in older versions of Windows is almost identical to how it works in Windows 10. In particular, Windows 7, 8 and 8.1 still have the exact same virtual memory interface.
We are not going to include anything older than Windows 7 in this discussion as there should no longer be existing computers running these unsupported operating systems.
The process is identical to the Windows 10 steps described above, starting from the point where you reach the performance settings window. However, getting there is a little different.
- Go to Start, then to Control Panel.
- Once there, open System. Then click on Advanced System Settings.
- On the Advanced tab of the System Properties window, click Settings.
From here, you can follow the same instructions as above. If you are using Windows 7, consider updating as soon as possible. Regular support for Windows 7 ended in 2015 and extended support in early 2020.
Summon Doctor Performance
While most modern computers won’t perform any differently if you change their swap settings, a small tweak can make a difference for low-end computers with limited RAM. Even on high-end machines that require more memory than their weight from time to time.
So, if the next time your computer stops working, it is possible that it will need a visit from the doctor who works with the paging file to fix it again.