How to increase swapfile sys. Swap file - why is it needed on a computer, why does the system “slow down” without it? Moving the paging file

Users operating systems Windows will be useful to know that the list of hidden system files, starting with Windows 8.1 and higher (windows 10) was supplemented with another file - swap. Knowing what a swapfile is and what it is used for will help you avoid many problems.

How is it different from the rest and what is it used for?

In its purpose, the swapfile is quite similar to the pagefile.sys swap file. It is used for temporary storage of unused this moment metro apps. Its main difference from other sys files is that if an application stored in it is accessed, the system opens it almost immediately. This is due to the fact that the application is stored in a file in a "full" state, which allows the system to run it without additional access to the hard disk.

All swapfile configuration options

Because the swapfile is similar to the swap file, all changes to one apply to the other. Both of them belong to the computer's virtual memory, since they perform quite similar functions. That is, you can increase / decrease or delete swapfile only together with pagefile.sys. By default, the system automatically launches them and allocates a certain amount of hard disk space for them. In case of disagreement with the system data, the user can make the following changes to them:

  • increase/decrease volume;
  • disable;
  • move to another hard drive.

How to increase/decrease the amount of virtual memory?

In order to be able to make any changes to the file, you need to run advanced system settings. You can do this in several ways:

  • by launching from the menu bar start - system - advanced system settings;
  • from the start menu bar by typing "performance" in the search box;
  • from the menu bar "My Computer" - properties - advanced system settings.

Please note that when launching parameters through the search box, the number of steps required is somewhat lower than when using other methods. After opening the window, you need to go to the "Advanced" tab and click the "Change" button.
If the system has not previously made any changes regarding the virtual memory of the computer, a checkmark will be in the window that opens, allowing the system to determine the file size itself. By removing it, you can independently change its dimensions by manually entering them and clicking the "Set" button.

How to disable virtual memory?

It is physically impossible to remove a swapfile from a computer, but it can be disabled. In this case, the hard disk space will no doubt increase, but the performance of the PC may noticeably deteriorate. It turns off in the same place where its dimensions change, although the choice of actions will be slightly different. Instead of specifying the amount of virtual memory, you need to select the item "Without paging file" and click the "Set" button.
Important: after the actions taken, you should not try to check whether the problem has disappeared, because before the necessary reboot of the PC is performed, the swapfile will be in place.

How to move swapfile to another hard drive?

You can also configure the swap file by transferring it to another hard drive. Please note: we are talking about hard or SSD drive, but not about the logical partition on it. Transferring it to a separate hard drive will save space on the system hard drive, while maintaining system performance.

The transfer process is quite simple. It is necessary to delete the swapfile by selecting the virtual memory of the computer on drive C, selecting the item “Without swap file” and saving the result by pressing the “Set” button, enable (add) it on another hard drive. When specifying file sizes, it is advisable to set the automatic size selection mode or manually specify the most optimal one for your computer.

How to determine the optimal file size?

Before you start resizing yourself, trying to save some hard drive space or speed up your computer's performance, it's worth exploring this issue a little deeper. Since users use a computer for different purposes, each will have its own optimal size.

In order to find out what it is for you, run several programs, games and videos that are most important to you at the same time. Next, open the Task Manager and go to the "Performance" tab. Here you need to see how much the computer's RAM is loaded, double this number, and then subtract as many GB as actually installed on the computer. For example, 7GB is currently used random access memory, and only 8 are installed on the computer, then the optimal size will be 7+7-8=6GB.

How to check if the swapfile has disappeared from the hard drive?

After turning off and restarting the computer, you can check if the file has disappeared from hard drive. To do this, you need to display all hidden system files. You can do this in the Explorer window by doing the following: file - change folder and search options - view - hide protected system files.


After completing these steps, hidden system data, if not disabled, will be displayed in the root of drive C.


Below is a video on the topic. It briefly describes and clearly shows all possible actions with the swapfile.

Conclusion

Swapfile, of course, is quite similar in purpose to pagefile.sys, but they also have differences regarding write and read speeds. Both files belong to the virtual memory of the computer and it is physically impossible to delete the swapfile or pagefile. The only manipulations that the system allows are turning them off and resizing them.

This article discusses the purpose of the page file, the benefits of placing it on a different physical drive, and also provides step by step instructions by moving it to Windows.

A note about links in this article

The first version of the material was written a very long time ago, and during this time the pages of Microsoft sites have changed or disappeared altogether. You can view their previous content using the Internet archive, although in the Russian Federation it is Roskomnadzor. Since there are no current pages with this information, I decided to leave the links "as is".

Next in the program

What is a swap file and what does moving it do

According to help Windows Vista, where the swap file is called the page file, it is a hidden file or files on a hard disk used by Windows to store portions of programs and data files that can't fit in RAM. page file and physical memory or random access memory (RAM) constitute virtual memory. Windows moves data from the page file to RAM and from RAM to the page file as needed to make room for new data. Also called swap file.

Placing the paging file on a partition specially designated for it another physical disk improves Windows performance by speeding up the processing of input/output (I/O) requests. In addition, the file placed in this way is not fragmented, which also improves performance.

How many swap files should there be and where to place them

There is an article in the Microsoft Knowledge Base (KB307886) that talks about how to move the paging file in Windows XP (no newer ones have been published). Specifically, the article states that you you can increase system performance, as well as free up space on boot partition, moving given file to an alternate partition. Unfortunately, the article does not cover one important point.

It makes sense to move the paging file only to a partition located on another physical disk, which I have already mentioned twice in this article.

This, however, is discussed in another article (KB314482), which provides the rationale and benefits of this approach, as well as other tips for setting up the page file. For example, it says that if there is no paging file on the system partition, Windows will not be able to create memory dumps (memory.dmp), which can be useful for troubleshooting the OS. I recommend that you read this article to better understand the benefits of moving the swap file.

As for placing the paging file on another partition of the physical disk on which the operating system is installed, this approach, although it avoids fragmentation of the paging file, does not lead to faster processing of I / O requests, which is much more important for improving OS performance, than a defragmented swap file. In Windows XP, one physical hard drive, it was enough to organize the defragmentation of the paging file using the PageDefrag utility, but in newer OS it does not work.

If you have two or more physical disks, according to Microsoft recommendations, it is optimal to create several swap files - on the system partition (in fact, to preserve the ability to write memory dumps) and on other physical disks (to increase performance by speeding up I / O operations).

Having several paging files at its disposal, the system itself chooses fastest option. Therefore, in a bunch of SSD + HDD, two FPs are useful only when the SSD is loaded with work to the eyeballs. But with a pair of SSDs, two FPs might well make sense, and that's exactly what I've done.

How big should the swap file partition be?

Since the gain from defragmenting the FP is negligible, it can be ignored and not create a separate partition for the FP (this is definitely not required when placing the second FP on an SSD). In any case, there can be no specific recommendations on the maximum size of the paging file, since everything depends both on the amount of installed RAM and on how intensively the paging file is used by the system and applications.

Obviously, the more RAM installed, the less swap file is used. When the swap file size is managed by the system, it maximum size does not exceed three RAM sizes. In most cases, a partition with this size will be sufficient. Increasing the paging file unnecessarily will not increase performance - this will not make the system use it more actively.

How to move the swap file

Conclusion

This article provides recommendations for configuring the paging file to improve the performance of Windows Vista and newer. In particular, the issue of moving the paging file to a separate partition of another physical disk is considered, and step-by-step instructions are provided explaining how to do this.

You can find answers to other questions about the swap file in the OSZone forum thread. In particular, it says how big should the swap file be, is it possible to work without a swap file and is it good etc.

On all or almost all resources where I saw this question asked, the answer was almost the same: "impossible". In fact this is not true.

For reference:

the Swapfile.sys file is located in the root of the boot (system) windows partition and has the attribute "hidden", which is why it is not visible to the naked eye. Has a size of 256MB. Its appearance is directly related to the so-called metro applications introduced in windows versions 8.0.

For technical reasons, MS could not use one pagefile.sys file for both classic and newborn applications and remembered the good old name familiar to all elders from the time when windows required megabytes of memory, not gigabytes (yes, yes , such a time was).

Unlike the swap file, there are no tools in the windows interface to manage the location of the reincarnated container.

The reasons for migrating the swapfile.sys file are almost the same as for its relative pagefile.sys:

  • the presence of a faster partition than the one where the system is currently installed
  • attempt to maximize free space on system drive
  • centralized storage of all garbage material on a separate section

How to do it? easy, thereinstruction in English . For those who are not strong in angelic, I will try to briefly explain the essence of the actions.

Stage I : You need to disable the swap file on ALL windows partitions.

Do not forget to confirm each action in this window by pressing the Set button for each disk where we disable the FP. The checkbox "Automatically choose the size of the paging file" should be unchecked.

Stage II : run the command prompt as administrator and run the command

mklink c:\\swapfile.sys k:\\swapfile.sys

where k: is the letter of the target partition where the file will be located. The bottom line is that we are replacing the original with a link to it - physically it will be located on the specified disk, but the system will be sure that the file location is unchanged. A link will be located on the system disk that does not take up disk space.

For reference:

command line in desired form the easiest way to find it is by pressing the keyboard shortcut Win + X, in the menu select " Command line(administrator)", if necessary, confirm the action.

Stage III : enable swap file by placing it anywhere.

Regardless of the location of the paging file pagefile.sys, swapfile The .sys will be created where we told it to be - in our case on drive K:

At one time, he did a similar operation himself, used the possibilities for transferring Plugin Total Commander "a - ntfslink, from the PE environment. It works this way and that.

In "swapfile.sys" the system moves some types of data that are not currently in use. So far, this file is used for the data of the so-called universal applications (formerly Metro). Perhaps in the future other data will be recorded there.

Swapfile.sys, Pagefile.sys and Hiberfil.sys

The file "swapfile.sys", along with "" and "", is stored on the system drive - by default it is "C:\". You can see it only if the option is enabled in the settings and the option "Hide protected system files" is disabled (Hide protected operating system files).

In the hiberfil.sys file, the system saves all the contents of RAM when it enters sleep mode. It is also used for new function"hybrid loading", thanks to which Windows startup 8 and 10 sped up significantly. And the pagefile.sys file is designed to unload data from RAM when the space in it runs out.

Why is the swapfile.sys file needed?

There is little official information from Microsoft on this subject, but we can make up an answer from publications on the forums and on the company's blog.

In short, the "swapfile.sys" file is used to dump the data of new applications that have changed their name more than once in official terminology: universal apps, Store apps, Metro apps, modern apps, Windows 8 apps, Windows 8 interface style apps , etc.

These applications are managed differently than desktop programs for Windows. The system approaches their memory management more intelligently. Here's how Microsoft employee Black Morrison describes it:

The question may arise: why do we need another virtual swap file? The fact is that with the advent of modern applications, we needed new way managing their memory outside of the traditional virtual memory/paging file method.


Windows 8 can essentially write the entire set of (private) working data of an inactive modern application to disk to free up RAM when the system runs out of it. It's the same as translation separate application to sleep and resume when the user accesses the application again. In such a situation, Windows 8 uses the modern application pause/resume mechanism to unload and load the application's work data.


Instead of the standard "pagefile.sys" file, the data of inactive universal applications is dumped into the "swapfile.sys" file.

Additional details are provided by Microsoft employee Pavel Lebedinsky:

Pausing/resume a Metro app is just one use case, there may be more in the future.


A "swapfile" file and a regular "pagefile" differ in usage and disk space requirements, dynamic growth capability, read/write policies, etc. Having two separate files makes things easier.


Shortly speaking, standard file swap is used for normal Windows tasks, and the new frame Microsoft applications provides for the use of a separate file for intelligent data upload of new applications.

How to delete the "swapfile.sys" file?

This file is not large at all - its maximum size should not exceed 256 MB. Therefore, there is no need to remove it. Even if we are talking about a tablet with a small amount of internal storage - after all, the swapfile.sys file, most likely, allows you to increase the speed of the device.

The "swapfile.sys" file is managed in conjunction with "pagefile.sys". Disabling the latter disables "swapfile.sys" as well.

But if you really want to, you can still remove it. To do this, open the Start menu (Start), enter in the search keyword"performance" and select the link "Adjust the appearance and performance of Windows" in the results.

In the Performance Options window, open the Advanced tab and under Virtual memory, click the Change button.

Uncheck Automatically manage paging file size for all drives, select the drive, select the No paging file option, and click Set. After the reboot, the "pagefile.sys" and "swapfile.sys" files will be deleted from the selected drive.

After that, it is possible to recreate the swap file on another drive, and then Windows will store all virtual memory files there. This allows, for example, to extend the life of the SSD by moving the page files to a mechanical hard drive.

In Windows 8.1 and 10, swapfile.sys is located on the system drive. It can only be seen if the display function is turned on. hidden files and folders, as well as disable the option to hide protected system files. Next to it are stored pagefile.sys and hiberfil.sys. They are familiar with previous versions operating systems. The system uses the hiberfil.sys file to save RAM data when hibernating and also for more fast loading operating system.Pagefile.sys unloads RAM data when there is not enough space in it, that is, it is a temporary data storage file.

What is swapfile.sys?

Now I will explain in more detail about the swapfile.sys file. It is also a data storage file, like pagefile.sys, but uploads data from new modern (Modern) applications. The system manages the memory of such applications differently. Swapfile.sys and pagefile.sys differ in terms of usage, storage space, read/write, etc. Microsoft is reluctant to provide scant details about this file. And if very briefly, then two files make it easier for developers to work and save memory. That is, the pagefile.sys file is used by Windows for standard tasks, and swapfile.sys serves separate file to upload Modern app data.

Why shouldn't you touch swapfile.sys?

The size of this file does not exceed 256 MB. Removing it will not add much disk space. Boot speed and system performance will slow down, which I wouldn't recommend. After all, the main advantage of new operating systems lies in their speed, and not in a beautiful design. If you still really want to remove swapfile.sys from the system?
The swapfile.sys file can be disabled. It is managed in tandem with pagefile.sys, so by disabling the standard one, disable swapfile.sys as well.

Right-click on the Start button, select "System"

followed by " Extra options systems",

then in "Performance" select "Settings",

click "Advanced" and in the item "Virtual memory" click "Change".

Now you need to uncheck "Automatically choose the size of the swap file", select the disk, select "No swap file" and click "Set".