If you turn on the display of hidden files and folders in Windows 8.1 and 10, then in the root of the system disk, in addition to the pagefile.sys and hiberfil.sys already familiar to many users, you can see the swapfile.sys file, which was not in previous versions operating system. What is this strange file and what is it for? Swapfile.sys is somewhat similar to the pagefile.sys swap file, but is used to temporarily store data of a different type, namely universal application data.

If the data of a Modern application is not currently in use, it is moved to swapfile.sys so that it does not take up extra memory space and is retrieved when it is requested by the user again. official information there is still very little on swapfile.sys, but judging by the mean comments of Microsoft employees, the creation of a separate swap file was necessary due to the specifics of the work of universal applications. That is, in the literal sense, two separate swap files make it easier for developers to work.

While having similar tasks, the swapfile and pagefile files are nevertheless different from each other. minimum requirements to disk space, read/write methods, dynamic expansion capabilities, and so on.

Many are wondering if swapfile.sys can be deleted? In principle, it is possible, but it is not recommended to do this, especially since its management mechanisms are closely related to the main swap file. And there is no point in deleting it, even on small SSD drives. The maximum size of swapfile.sys is usually less than 256 MB, so you won't gain anything by deleting it.

But if you really want to get rid of it, please, just do it right. Click right click mouse on the Start button and select System -> Advanced system settings, in the "Performance" block, click the "Settings" button, switch to the "Advanced" tab and in the "Virtual memory" block, click "Change".

Now uncheck the "Automatically select the size of the paging file" checkbox and, having selected the section with the mouse, turn on the "No paging file" radio button. Click the Set button, save your settings, and restart your computer.

Both swapfile and pagefile will be removed from disk.

Have a great day!

10 facts about swapfile.sys - What is this file and can it be deleted

Owners of operating rooms Windows systems from 8.1 and above, you might notice that the list of system files has been supplemented with one more - .

What this file is responsible for and whether it is needed in the system, all PC users need to know.

What is swap file?

In addition to pagefile.sys, the Resource Monitor has swapfile.sys.

These are all swap files and are used exclusively for metro apps.

By default, such files are stored in the root folder. hard drive and do not exceed 256 MB in size.

At the request of the user, the amount of memory of the swap file can be increased.

Why did the system have a third paging file?

The need for a third file arose after it was required new way memory management, due to the emergence of a large number of applications with the Metro-interface.

Such applications require a little more memory for their work.

To see the swap file, you first need to enable the display of protected system files.

You can display them like this: Control Panel - Folder Options.

In the folder options, find the tab "View" and open it, remove the marker from the item and save the settings by pressing the OK button.

When there is not enough RAM while applications are running, the system automatically writes data to swapfile.sys.

Thus, it became possible to suspend inactive applications to unload "operatives".

Restoration of applications occurs automatically after the release of RAM.

How does swapfile work?

The work of the swap file can be disassembled in stages:

1. PLM (Process Lifetime Manager - Dispatcher life cycle ) calculates the volume of the missing virtual memory and sends a request to MM (Memory Manager - Memory Manager) to release the working set of one of the processes that is responsible for processing Metro applications.

2. The memory manager processes the request, then instructs to move the memory page to the list last pages with operating system changes.

All page content is automatically copied and saved to disk.

3. The set of pages is written in turn to the modified list page as indicated by MM.

Recording is done in the background and only triggers when there is not enough virtual memory.

4. After updating the application, the worklist is uploaded to HDD.

Those memory pages that were removed from the process will still remain untouched in the waiting list.

In another way, we can say that they remained in the cache of useful pages, which, if necessary, can be used for other applications.

If the memory pages are required by the "native" application, the system can quickly return them.

Where is the swap file located?

You can find it in the root folder of the hard drive where the operating system is installed.

Most system files are protected and hidden.

Therefore, to find it, you need to display all the hidden system files.

You can configure the display of hidden files not only in the way that we described above. There is one more option.

To do this, go to root folder hard disk and on the left upper corner open the menu "File", in which you need to select an item "Change folder and search options".

In the window that opens, open the tab "View", uncheck the box "Hide protected system files" and save the changes by pressing the Apply and OK buttons.

After that, not only the swap file swapfile.sys, but also other important system files will be displayed in the root folder.

Under no circumstances should you delete such files! This is fraught with the risk of breakage for your computer system. Otherwise, you will have to reinstall the operating system completely.

Difference and belonging

Actually swapfile is analogous to pagefile. They are both used for temporary storage of application data, offloading random access memory.

What distinguishes them from other files with the .SYS extension is high speed response of applications stored in the swap and pagefile.

Customization options

If necessary, the user is given the opportunity to change the amount of available space, disable or delete the swap file, and also transfer it to another hard drive.

However, you can only change or delete it at the same time as the pagefile.

By default, the system has the function of automatically launching the file and allocating memory for them on the hard disk.

If the user does not agree with default settings, he is given the opportunity to change them.

How to change the amount of virtual memory

There are several ways to change the amount of virtual memory:

  • Menu "Start" - "System" - "Advanced system settings".
  • In the menu search bar "Start" enter "Performance"(without quotes).
  • Menu "My Computer" - "Properties" - "Advanced system settings".

Opening settings through the search bar requires fewer steps than using other methods.

In the window that opens, go to the tab "Additionally", then LMB click the Edit button.

If you have not made any changes to the system's virtual memory settings before, the new window will have a marker on the item.

If you remove this marker, you can independently change the size of the allowed memory at will.

To do this, manually enter the allowed volume, then click the Set button.

Disabling virtual memory

It is impossible to remove the swap file completely from the computer, but you can disable it until the moment when there is no need to expand the OP.

In the window for changing virtual memory parameters, put a marker on the item "No paging file", confirm the action by pressing the Set and OK buttons, and then restart the computer system.

It is worth noting that the amount of free memory on the hard drive will increase, and the performance of the operating system may be significantly reduced.

To restore the swapfile, you need to go to the same parameters window and put a marker on the item "Automatically choose swap file size", or set the virtual memory size, then reboot the system.

After a restart, the paging file will be restored.

Move swapfile to another hard drive

You can also customize the swap file by transferring it to another hard drive.

In this case, it is a different hard drive that is meant, and not a logical partition of the same disk.

Transferring a swap file saves disk space with the system, but performance does not change.

To transfer, you need to make a symbolic link.

Mklink c:\\swapfile.sys g:\\swapfile.sys

Instead of the letter g, you can put any other that corresponds to the disk you need.

After all the manipulations performed, it is required to reboot the operating system.

Determining the optimal amount of virtual memory

Before changing the amount of virtual memory, you should consider why you are increasing the performance of your computer.

If this is an office PC or a laptop for work, you should not increase the memory too much.

For a gaming computer, consider the amount of memory of the hard drive itself.

To determine the optimal amount of memory, run several priority programs, games and / or videos on the computer at once.

By pressing the Ctrl+Alt+Delete keys at the same time, call the task manager and go to the tab "Performance".

In this window, you need to find out how much RAM is loaded, then multiply this number by 2 and subtract the amount of memory actually installed.

For example, you have 5 GB of RAM loaded and 6 GB actually installed. We calculate: (5+5)-6=4 .

Exactly this amount of additional virtual memory will be optimal for your computer.

Checking swapfile after disconnect

After you have disabled the paging file, you can check if it has disappeared from the computer system.

To do this, you first need to enable the display of all hidden system files.

To display, open the explorer and follow the following path: "File" - "Change folder and search options" - "View" - "Hide protected system files".

Save the changes by pressing the Apply and OK buttons.

If you disabled the swap file correctly, it will not show up in the system folder.

Check for a swap file

Advantages and disadvantages of Swapfile

Advantages:

  • Budget Savings. Thanks to the swap file, you can do without buying additional RAM cards for some time. If the extension is required for a certain time, you can use swapfile.sys.
  • Performance Stability. The lack of RAM greatly slows down the system, which definitely causes crashes. If there is enough memory on the hard disk, you can expand the virtual memory to the optimal amount.
  • Great temporary solution. If you do not have enough RAM to run demanding programs, the swapfile.sys extension will provide you with the temporary support you need.

Flaws:

  • Slow reading speed. If the swap file is not placed on the system hard disk, the response time may increase.
  • Swapfile is just RAM support. Swap will not be able to replace or supplement it fully.
  • Volume costs memory hard disk. If there is not enough hard disk space free space, swap will not help much in solving problems of lack of RAM. You will have to buy a new OP anyway.
  • High chance of computer crash. With the constant use of the swap file as an extension of the OP, a system failure may occur, because of this, your computer may need to reinstall the operating system or a comprehensive repair.

conclusions

Allows you to temporarily expand the amount of RAM, but does not solve the problem of lack of available space properly.

Swap can only be used as a temporary solution.

At the same time, there is a danger of a BIOS error appearing, since this is a software “overclocking” of the computer, which is not initially provided for by operating systems.

For gaming computers such a solution is not only useless, but also dangerous, since these computers use the system resources of their devices to the limit.

Using a swap file can lead to both incorrect operation and failure of your PC hardware.

If you doubt your skills, contact the service center, where specialists will help you sort out your problem, as well as advise you or independently configure your computer system.

Contact only licensed service centres who have good feedback Or I work at computer shops.

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 "swapfile.sys" file, along with " " and " ", is stored on 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 operating system files" is disabled.

In the hiberfil.sys file, the system saves all the contents of RAM when it enters sleep mode. It is also used for new feature"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 data from new applications that have changed their name more than once in official terminology: universal apps, apps from the Store, Metro apps, modern apps, Windows applications 8, application style Windows interface 8, etc., etc.

These applications are managed differently than Windows desktop programs. 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 point is that with the advent of modern applications we needed a new way to manage their memory outside the traditional method, involving the use of virtual memory/paging file.


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. This is the same as putting an individual application to sleep and resuming when the user accesses the application again. In such Windows situations 8 uses the pause/resume mechanism of modern applications to unload and load application 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.


In short, the standard swap file is used for normal Windows tasks, and the new framework 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 big at all - its maximum size must 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.

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. Because the current pages with this information not, 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 hidden file or hard disk files used by Windows to store parts of programs and data files that can't fit in RAM. The page file and physical memory or random access memory (RAM) make up virtual memory. As Windows needs moves data from the page file to main memory and from main memory to the page file to make room for new data. Also called swap file.

Placing the paging file on a partition specially designated for it another physical disk raises Windows performance, because the processing of input / output (I / O) requests is accelerated. 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 swap file on 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 the 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 size of the page file is managed by the system, its maximum size is no more than three times the amount of RAM. 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.

Users operating systems It will be useful for Windows to know that the list of hidden system files, starting with Windows 8.1 and higher (windows 10), has been 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 others sys files is that in case of access to the application stored in it, the system almost immediately opens it. 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 Extra options systems. 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 drive 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 a swap file” and saving the result by pressing the “Set” button, enable (add) it on another hard drive. When specifying file sizes, it is desirable to set auto mode choose the size or manually specify the most optimal one for your computer.

How to determine the optimal file size?

Before you start resizing yourself in an attempt 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 the computer for different purposes, and optimal size everyone will have their own.

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, at the moment 7 GB of RAM are used, and only 8 GB are installed on the computer, then the optimal size will be 7 + 7-8 = 6 GB.

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 the 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.