Optimal paging file size in Windows 7 and 10


02/25/2016 windows

In Windows operating systems, the so-called paging file pagefile.sys is used for work (hidden and system, usually located on drive C), which is a kind of “extension” of the computer’s RAM (otherwise known as virtual memory) and ensures that programs work even if when there is not enough physical RAM memory.

Windows also tries to move unused data from RAM to the page file, with each new version doing a better job of doing so, according to Microsoft. For example, data from the RAM of a program that has been minimized and not used for some time may be moved to the page file, so its subsequent opening may be slower than usual and cause access to the computer's hard drive.

If the paging file is disabled and the amount of RAM is small (or if you are using processes that require computer resources), you may receive a warning message: “Your computer does not have enough memory. To free up memory for programs to run normally, save your files, and then close or restart any open programs" or "To prevent data loss, close programs.

By default, Windows 10, 8.1 and Windows 7 automatically detect its settings, but in some cases changing the page file manually can help optimize the system, sometimes it may be advisable to disable it altogether, and in some other situations the best thing is not to change anything and leave it automatic determination of the paging file size. This guide will show you how to increase, decrease, or disable the page file and remove the pagefile.sys file from disk, as well as how to properly configure the page file depending on how you use your computer and its characteristics. The article also contains video instructions.

Windows 10 Page File

In addition to the pagefile.sys swap file, which was present in previous versions of the OS, in Windows 10 (back in 8, in fact), a new hidden system file swapfile.sys appeared, also located in the root of the system partition of the disk and, in fact, also representing is a kind of swap file used not for regular ones (“Classic application” in Windows 10 terminology), but for “Universal applications”, previously called Metro applications and several other names.

The new swapfile.sys was required due to the fact that universal applications have changed the way they work with memory and, unlike conventional programs that use the swap file as regular RAM, the swapfile.sys file is used as a file that stores the “full” the state of individual applications, a kind of hibernation file for specific applications, from which they can continue to work for a short time when accessed.

Anticipating the question of how to remove swapfile.sys: its presence depends on whether the regular swap file (virtual memory) is enabled, i.e. it is deleted in the same way as pagefile.sys, they are interconnected.

What happens if you remove swap files?

If you decide to remove paging files, then in the future all programs and applications will interact only with RAM, this can lead to excessive RAM load or insufficient RAM for normal operation of the system and processes in it. You should only resort to disabling paging files if you have more than 4 GB of RAM and do not use demanding programs, then the speed of the system and programs in it will increase.

The performance increase will occur due to the fact that the system will not access the hard drive, and will work only with RAM, the speed of which is much higher than that of the hard drive. But if the RAM is heavily loaded, the computer may reduce the speed of data processing, or even stop some processes altogether.

How to increase, decrease or delete the page file in Windows 10

And now about setting up the paging file in Windows 10 and how you can increase it (although here, perhaps, it’s better to just set the recommended system parameters), decrease it if you think you have enough RAM on your computer or laptop, or disable it completely. thereby freeing up space on your hard drive.

Setting up the swap file

To go into the Windows 10 page file settings, you can simply start typing the word “performance” in the search field, and then select “Adjust system presentation and performance.”

In the window that opens, select the “Advanced” tab, and in the “Virtual Memory” section, click the “Change” button to configure virtual memory.

By default, the settings will be set to “Automatically select the size of the paging file” and today (2016), perhaps, this is my recommendation for most users.

The text at the end of the instructions, where I tell you how to correctly configure the paging file in Windows and what sizes to set for different sizes of RAM, was written two years ago (and has now been updated) although, most likely, it will not cause harm, it is still not the same , which I would recommend for novice users to do. However, an action such as moving the page file to another drive or setting it to a fixed size may make sense in some cases. You can also find information about these nuances below.

In order to increase or decrease, i.e. manually set the paging file size, uncheck automatic sizing, set the required dimensions and click the “Set” button. After that, apply the settings. The changes take effect after you restart Windows 10.

To disable the paging file and delete the pagefile.sys file from drive C, select “No paging file”, and then click the “Set” button on the right and answer affirmatively to the message that appears as a result and click Ok.

The paging file from your hard drive or SSD does not disappear immediately, and after you restart the computer, you will not be able to delete it manually until that moment: you will see a message saying that it is in use. Further in the article there is also a video that shows all the operations described above for changing the paging file in Windows 10. It may also be useful: How to move the paging file to another disk or SSD.

But here are the options when pagefail can, in principle, be turned off:

  1. You have installed an SSD drive and want to disable pagefail in order to extend the life of the new drive, because it has only a limited number of data overwrites and the price is much higher than a regular HDD drive. In this case, you can experiment with clearing pagefail, but only if the amount of RAM on your device exceeds 8 GB.
  2. If the computer has 4 or 6 GB of RAM, then without a page file Windows 10 will work normally only in conjunction with ReadyBoost technology. This technology uses external drives such as flash drives and SD cards to place the system cache on them, which slightly increases performance.

You will learn how to change the paging file in Windows 10 from our other article.

Well, if all the pros and cons are weighed and the decision is made, let’s move on to the technical issue - how to delete the page file on Windows 10.

How to reduce or increase the page file in Windows 7 and 8

Before I talk about what the optimal page file size is for various scenarios, I'll show you how you can change this size or disable the use of Windows virtual memory.

To configure the paging file settings, go to “Computer Properties” (right click on the “My Computer” icon - properties), then select “System Protection” from the list on the left. A faster way to do the same thing is to press the Win + R keys on your keyboard and enter the command sysdm.cpl (suitable for Windows 7 and 8).

In the dialog box, open the “Advanced” tab, and then click on the “Options” button in the “Performance” section and also select the “Advanced” tab. Click the Change button in the Virtual Memory section.

This is where you can configure the necessary virtual memory parameters:

  • Disable virtual memory
  • Shrink or increase the Windows page file

Additionally, on the official Microsoft website there are instructions for setting up the paging file in Windows 7 - windows.microsoft.com/ru-ru/windows/change-virtual-memory-size

Access to paging file resizing features and optimization methods

Setting up and changing the size of the file itself is done in the standard “Control Panel”. There, the settings and security section is initially selected, then the “System” menu. On the left side of the window there is a hyperlink to additional options. By clicking on it, you can access the main settings window. Here you use the “Advanced” tab and go to change settings by clicking the “Options” button.

Here, again, there is an “Advanced” tab, in the menu of which there is a line “Virtual memory” and a “Change” button. Click it and go to settings.

You can immediately see that the default size is set to a certain size, since the automatic selection line is enabled. Now we uncheck it and try to change the set size at our discretion. This is where the tricky stuff starts.

The fact is that some users have a strongly held belief that a larger dimension setting will result in faster data processing. Absolute nonsense! If the specified size is too large, the system will simply begin to ignore the RAM and increasingly turn to the reserved area of ​​​​the hard drive. And this, as already mentioned, happens at a speed slower than when accessing the RAM. But the system itself, when using RAM, is capable of reserving about 30% of resources so as not to access the paging file.

Correctly setting up the paging file

There are many different recommendations on how to properly configure the page file in Windows from people with very different levels of competence.

For example, one of the Microsoft Sysinternals developers recommends setting the minimum page file size equal to the difference between the maximum amount of memory used at peak load and the physical amount of RAM. And the maximum size is the same number multiplied by two.

Another common recommendation, not without reason, is to use the same minimum (initial) and maximum size of the paging file to avoid fragmentation of this file and, as a result, reduced performance. This is not relevant for SSDs, but may make sense for HDDs.

Well, the setting option that comes across more often than others is to disable the Windows page file if the computer has sufficient RAM. I would not recommend doing this to most of my readers, because if problems arise when starting or running programs and games, you may not remember that these problems may be caused by disabling the page file. However, if you have a strictly limited set of software on your computer that you always use, and these programs work perfectly without a page file, this optimization also has a right to life.

Moving the paging file to another drive

One option for setting up the paging file, which in some cases may be useful for system performance, is to move it to a separate hard drive or SSD. This refers to a separate physical disk, and not a partition on the disk (in the case of a logical partition, moving the paging file, on the contrary, can lead to a decrease in performance).

How to move the page file to another drive in Windows 10, 8 and Windows 7:

  1. In the Windows paging file (virtual memory) settings, disable the paging file for the disk on which it is located (select “No paging file” and click “Set”.
  2. For the second disk to which we are transferring the paging file, set the size or set it to the system’s choice and also click “Set”.
  3. Click OK and restart your computer.

However, if you want to move the page file from the SSD to the HDD in order to extend the life of the SSD, it may not be worth doing this, unless you have an old SSD with low capacity. As a result, you will lose in performance, and the increase in service life may be very insignificant. More details - Setting up an SSD for Windows 10 (also relevant for 8).

Attention: the following text with recommendations (unlike the one above) was written by me about two years and in some points is not entirely relevant: for example, for today's SSDs I no longer recommend disabling the page file.

In various articles related to Windows optimization, you can find recommendations to disable the paging file if the RAM size is 8 GB or even 6 GB, and also not to use automatic selection of the paging file size. There is logic in this - when the paging file is disabled, the computer will not use the hard drive as additional memory, which should increase operating speed (RAM is many times faster), and when manually specifying the exact size of the paging file (it is recommended to indicate the initial and maximum the same size), we free up disk space and relieve the OS of the task of adjusting the size of this file.

Note: if you are using an SSD drive, it is best to set the maximum amount of RAM and completely disable the page file, this will extend the life of the solid-state drive.

In my opinion, this is not entirely true and first of all, you should focus not so much on the size of the available physical memory, but on how exactly the computer is used, otherwise you risk seeing messages that Windows does not have enough memory.

Indeed, if you have 8 GB of RAM, and your computer work consists of browsing the Internet and playing a few games, it is likely that disabling the page file will be a good solution (but there is a risk of encountering a message that there is not enough memory).

However, if you edit video, do photo editing in professional packages, work with vector or three-dimensional graphics, design houses and rocket engines, use virtual machines, 8 GB of RAM will not be enough and a page file will certainly be required during the work process. Moreover, by disabling it, you risk losing unsaved documents and files if you run out of memory.

Optimal size

Whether or not to change the page file depends on the equipment of the machine itself and what you do on it, for example, if you like to open a bunch of applications and keep them minimized for a long time, then you should increase its size by at least 2 times.

Let's consider in what cases this should not be done:

  1. If in your settings (where they are, I will write below) the value “selection of SWAP size by the system” is set and the machine does not slow down, there are no freezing programs, and so on. Why do you need to optimize something if everything works stably?
  2. If you weren’t “greedy” and equipped your PC with 16 GB of RAM.
  3. If you have less than 16 GB (8, 6 or 4), but no matter what you do, there is always more than 30% of memory left.
  4. If you use your PC exclusively for such manipulations as creating and storing text documents, playing solitaire and viewing email, then you are running processes that do not take up a lot of memory while working.

For those who still decide to interfere with the operation of Windows 10 in order to independently set the size of the paging file, I will give several recommendations:

  1. When changing SWAP, set the minimum and maximum values ​​to the same (512-512, 1024-1024, and so on). In this case, you will reduce file fragmentation and, accordingly, avoid the need to defragment.
  2. Follow the following rules (the optimal values ​​are determined empirically and are not mandatory, but in 90% of cases everything starts working as it should) - RAM 512 Mb/ SWAP 5012-5012 Mb, 1024/4012-4012, 2048/3548-3548, 4096/ 3024-3024, 8 GB/2016-2016, 16 GB/not required.

Friends, have you noticed a trend? The more RAM there is on a PC, the less paging file is needed, since the system will work directly with the RAM. BUT! I repeat, some programs (games, graphic editors, etc.) simply do not function without a “virtual”, and a dump is also stored in it - error information when a blue screen of “death” appears.

Page file on SSD and Windows 7

To increase performance on a computer running Windows 7, users use an SSD drive. There is a lot of controversy regarding the choice of media, so everything needs to be sorted out. Computers use two types of disk:

  • HHD.
  • SSD.

HHD solid state media operate using a magnetic disk. They have a large amount of memory, but there are a lot of problems. An SSD is a board, and in appearance the design is more similar to a regular flash drive, but has large volumes. SSD drives are technologically more advanced and outperform hard drives in terms of speed of reading and writing information. In this regard, owners of such devices can count on significant returns when changing the paging file.

If your computer uses two types of media, Windows 7 operating system tools provide the ability to change the drive.

Instructions:

  • computer;
  • menu call;
  • selection of “properties”;
  • transition to “system protection”;
  • selecting the “advanced” tab;
  • "Options" button;
  • “additional” option;
  • changing settings;
  • unchecking “automatic selection”;
  • change disk in window;
  • saving settings.

After changing the disk, all that remains is to configure the computer settings correctly. The available methods are described above, it is better to check several options.

Removing the swapfile swapfile.sys

Perform the above procedures to delete pagefile. sys lead, among other things, to the deletion of the swapfile. sys. However, there are situations when the presence of regular “virtual memory” in the system is necessary, but the additional one must be abandoned. This can happen if METRO applications that use swapfile .

To do this, you will need a registry editor. Regedit.exe, which can be launched from the command line. Now you need to find the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management branch. Create a DWORD value. Give a name to SwapfileControl, and assign it the value “0”. Reboot and check for the presence of the file in the root of the disk. Only the “pagefile.sys” file should remain.

Tell your friends about this article:

Completely disabling pagefile.sys and swapfile.sys

The question of the need to completely disable paging files equally often worries Windows 7 and 10 users when a high-speed SSD drive or a sufficient amount of random access memory (RAM) appears. In the article about the optimal size of the paging file, it was already clarified that it makes no sense to completely disable it.

Reasons not to completely disable sfop (paging):

  1. Some programs and games, and Windows itself, are designed to work with the page file; without it, unexpected errors and glitches may appear.
  2. With a sufficient amount of RAM (8-16 GB and higher, depending on the tasks), 300-500 MB of data will be written to pagefile.sys per day. In other words, the user does not sacrifice anything.
  3. If you have enough RAM, you can set the file size limit to 1 GB and not worry about it in the future.

If you still want to turn off the paging file, in Windows 10 this is done as follows:

  1. Right-click on the Start , select System .
  2. In the left menu, click “Advanced system settings” (you must have administrator rights).
  3. Click Options , open the Advanced .
  4. In the “Virtual Memory” window, click on the Change…
  5. Uncheck the “Automatically select paging file size” checkbox.
  6. Just below, select the line Without paging file .
  7. Click Set , then Yes in the warning window that appears.
  8. Click OK in the Virtual Memory settings window to save the changes.

All changes will take effect after restarting the computer. Just in case, you can check whether pagefile.sys has really been deleted and is missing from the system root. If in the future any game or program requires this file or starts generating errors about insufficient virtual memory, you can turn pagefile back on in the same menu.

In Windows 7 and Windows 8/8.1, to change or delete the page file you need to:

  1. Right-click on the My Computer icon on the desktop and select Properties .
  2. In the left menu, select “Advanced system settings”.
  3. Go to the "Advanced" tab at the top of the window.
  4. In the Performance , click on the Settings .
  5. Go to the “Advanced” tab again. In the “Virtual Memory” section of the window it will be written what the maximum size the paging file can occupy at the moment.
  6. By default, these versions of Windows set the pagefile size to be equal to RAM. Click Change to set other values.
  7. Uncheck the “Automatically select paging file size” checkbox.
  8. Select No paging file to disable it completely.
  9. Click OK and restart your computer for the changes to take effect.

As already stated, Windows 7/8 does not work very well without the pagefile.sys file on the system. It is better to leave the swap size at 512-1024 megabytes for system purposes. This rule works regardless of the amount of RAM on the computer.

Operating rules for better performance

What happens if you disable the page file? Will be bad.

The exception is devices with a large amount of RAM (16 gigabytes or more), and if you use applications that require a lot of RAM consumption, it is advisable not to disable it. If you have a tablet running Windows 8 or 10, which has 16 GB of memory, and you want to delete the pagefile to free up space, or you are wondering whether it is possible to disable the page file for a PC with 6 GB of RAM, then the answer is clear - it’s better not to do this, without it, the system will perform even worse than with even a small volume (1-2 GB).

Use it on a faster drive.

If you use an SSD as a system disk, then it is better to set Virtual Memory on it.

Firstly, operations will be performed much faster than on a hard drive.

Secondly, the time has passed when solid-state drives had a very limited reserve of rewrite cycles, so you should not limit your PC and think about how to turn off the page file on Windows 10.

Do not use the system disk to store the paging file.

By using another logical drive (better than a physical drive) to store it, the number of accesses to the system drive is reduced and, in theory, should have a positive effect on the performance of the PC. The point is quite controversial; if you use an SSD as a system drive, the question arises where to set the Pagefile. In my personal case, after several tests in games and “heavy applications”, I preferred the SSD. In the case of the HDD, small staters and FPS drops occurred during testing, which was not noticed on the SSD.

Low RAM - increase the swap file.

In the current realities, when games require 8 GB of memory, and the browser can fill up the entire RAM by 100%, it is quite difficult to say exactly how much you need to set for virtual memory. I can offer basic recommendations, but if you play often or, conversely, hardly load your PC, the following values ​​may not suit you:

  • Less than 2 GB - from 2 to 4 GB virtual (100-200%)
  • 4 GB – from 4 to 6 GB (100-150%)
  • 8 GB – from 2 to 4 GB (25-50%)
  • 16 GB and Above – you can leave it to the system to choose from or, as an option, reduce the paging file.
  • For games and “heavy” applications, values ​​can increase by 50-100%

We have approximately determined the optimal size of the paging file on Windows 10 and the disk on which the Pagefile will be located, and as part of the familiarization, we will go through the basic commands in CMD if suddenly the graphical interface freezes or does not work.

How to make a swap file on a flash drive

Any flash drive on your computer can be used to expand RAM. When connecting third-party media, users probably noticed the “System acceleration” item. We are talking about Ready Boost technology.

Instructions for creating a flash drive to expand RAM:

  • media connection;
  • properties;
  • “formatting” option;
  • system acceleration;
  • volume selection;
  • OK.

After saving the data, the flash drive serves as an additional storage device. As in the case of a hard drive, initially the main RAM comes into play and then virtual technologies.

Rating
( 1 rating, average 5 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]