While working in Windows 8-10 (for example, opening large number graphic editors or running the game with elevated system requirements) may run out of space in the physical RAM. Therefore, to prevent running games and applications from crashing, the OS has a virtual analogue of RAM “Virtual Memory”, which is a file stored on the PC’s hard drive.

In Windows versions starting from 8, there are two files for swapping RAM: swapfile.sys and pagefile.sys. Below we will consider the first of them.

What is the function of the swapfile.sys file in Windows 10?

Microsoft (Windows developer) has created a store of applications that can be integrated (installed) on its OS. In the considered operating system this file It just serves as a paging file for such applications when the PC RAM is full. It is internal to the system and therefore is invisible among its files when installing the OS.

How to remove swapfile.sys?

It is advisable not to delete this file from the operating system. However, if such a need arises, its removal will not be a very critical change in the structure of the OS. To delete, you will need to disable the page file. And this in turn will also require deleting the pagefile.sys file.

Note! It's best not to delete any of the swap files. They take up little space and are not a problem when working with Windows.

It was said above that this file is a system file and is not visible by default when opened in Explorer. You can enable the display of hidden and system OS files as follows:

1. You need to click on the “Computer” icon on the desktop. Next, in the dialog box that appears (“Explorer”), click on the square on the right side of the window to expand the line (Ctrl+F1):

2. In the panel that opens, click the “View” tab and click on the “Options” item:

3. In the dialog box that appears, find “Hidden files and folders”, select “Show hidden files, folders and drives”, and then click the “Apply” button, “OK”:

After completing these steps, the file you are looking for, swapfile.sys, will be visible. To remove it, you need to follow the following steps sequentially:

1. By clicking on the “Start” menu, in the “Search programs and files” search field, enter the phrase “Performance” and in the list that appears, select and left-click on the line shown in the figure below:

2. In the dialog box that appears, click the “Advanced” tab and find the “Virtual Memory” subsection. Next in this subsection you need to click on the “Change...” button:

3. In the dialog box that appears, uncheck the “Automatically select paging file size” option, click on the “No paging file” option, click the “Set” button, and then the “OK” button:

After rebooting the OS, the file in question will disappear from the file structure. You can restore it by doing the reverse steps.

It will be useful for users of Windows operating systems 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 avoid many problems.

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

In terms of its purpose, swapfile is quite similar to the pagefile.sys swap file. It is used for temporary storage of currently unused metro applications. Its main difference from others sys files is that if you access an application stored in it, the system opens it almost immediately. This is due to the fact that the application is stored in the file in a “full” state, which allows the system to launch it without additional access to the hard drive.

All swapfile configuration options

Since the swapfile is similar to the swap file, all changes to one affect the other. Both of them refer to the computer's virtual memory because they perform fairly similar functions. That is, you can increase/decrease or delete swapfile only together with pagefile.sys. By default, the system automatically starts them and allocates a certain amount of hard disk space for them. If you disagree with the system data, the user can make the following changes to them:

  • increase/decrease volume;
  • disable;
  • transfer 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 additional system parameters. 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 “My Computer” menu bar - properties - additional system settings.

Please note that when launching parameters through the search box, the number of required actions is slightly lower than when using other methods. After opening the window, you need to go to the “Advanced” tab and click the “Change” button.
If no changes have previously been made to the system regarding the computer’s virtual memory, the window that opens will have a checkmark allowing the system to determine the file size itself. Having removed it, you can change its dimensions yourself by entering them manually and clicking the “Set” button.

How to disable virtual memory?

It is physically impossible to remove swapfile from your computer, but it can be disabled. This will undoubtedly increase your hard drive space, but your PC performance may noticeably deteriorate. It turns off in the same place where its size changes, although the choice of actions will be slightly different. Instead of specifying the amount of virtual memory, you need to select the “Without pumping file” option and click the “Set” button.
Important: you should not try to check whether the problem has disappeared after completing the steps, because before performing necessary reboot PC, swapfile will be in place.

How to move swapfile to another hard drive?

You can also configure the paging 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. You need to delete the swapfile by selecting it in the computer’s virtual memory on drive C, selecting “Without pumping 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 automatic mode select 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 looking into this issue a little deeper. Since users use a computer for different purposes, each person will have their own optimal size.

In order to find out what it is for you, run several of the 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 look at how much the computer’s RAM is loaded, double this number, and then subtract as many GB as are actually installed on the computer. For example, at the moment 7GB of RAM is used, 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 whether 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 following the following procedure: file - change folder and search options - view - hide protected system files.


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


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

Conclusion

Swapfile, of course, is quite similar in purpose to pagefile.sys, but they also have differences regarding writing and reading speed. Both files belong to the computer's virtual memory and it is physically impossible to delete swapfile or pagefile. The only manipulations that the system allows are turning them off and changing sizes.

In this article we will talk about such an interesting file as Swapfile.sys. This material will be of interest to those who like to study what certain operating system files are needed for, whether they are of any importance and whether they can be deleted. Well, now let's sort it out in order.

Where is Swapfile.sys located?

It is located in the root of the system disk (in some cases, it may be located on other partitions of the hard drive, depending on where your paging file is located). The fact is that Swapfile.sys is nothing more than a swap file. Only in the operating room Windows system 7, one file, pagefile.sys, was responsible for virtual memory; in the top ten, Swapfile.sys was also added to it.

Since this is a system file, you simply won’t see it unless you go to the root of drive C:

In order to see Swapfile.sys we need to enable the display of system files. To do this, right in the explorer window, click on the “File” tab and select from the drop-down menu "Change folder and search options".

In the window that opens, go to the “View” tab and remove the checkbox next to the item "Hide protected system files".

And here is our file.

Now let’s talk about whether it can be removed and how best to do it. I have already written about the paging file in Windows 10. Therefore, read and, depending on the parameters of your computer, decide whether to disable it or not, and here I will simply duplicate how the swap file and, accordingly, Swapfile.sys are deleted.

And so, right-click on the “This PC” icon and select “Properties” from the drop-down menu

In the window that opens, select « Additional options systems":

In the window that opens, remove the bird opposite the item "Automatically select paging file size"

Select the hard drive partition where the file is installed and set the switch to "No swap file" and click on the “Set” and “OK” button

That’s it, after this Swapfile.sys will be deleted from the computer and disk space will be freed up.

And also watch a video on the topic:

Rate this article:

In this article we will talk about such an interesting file as Swapfile.sys. This material will be of interest to those who like to study what certain operating system files are needed for, whether they are of any importance and whether they can be deleted. Well, now let's sort it out in order.

Where is Swapfile.sys located?

It is located in the root of the system disk (in some cases, it may be located on other partitions of the hard drive, depending on where your paging file is located). The fact is that Swapfile.sys is nothing more than a swap file. Only in the Windows 7 operating system was one file pagefile.sys responsible for virtual memory, but in the top ten, Swapfile.sys was also added to it.

Since this is a system file, you simply won’t see it unless you go to the root of drive C:

In order to see Swapfile.sys we need to enable the display of system files. To do this, right in the explorer window, click on the “File” tab and select from the drop-down menu "Change folder and search options".

In the window that opens, go to the “View” tab and remove the checkbox next to the item "Hide protected system files".

And here is our file.

Now let’s talk about whether it can be removed and how best to do it. I have already written about the paging file in Windows 10. Therefore, read and, depending on the parameters of your computer, decide whether to disable it or not, and here I will simply duplicate how the swap file and, accordingly, Swapfile.sys are deleted.

And so, right-click on the “This PC” icon and select “Properties” from the drop-down menu

In the window that opens, select "Advanced system settings":

In the window that opens, remove the bird opposite the item "Automatically select paging file size"

Select the hard drive partition where the file is installed and set the switch to "No swap file" and click on the “Set” and “OK” button

That’s it, after this Swapfile.sys will be deleted from the computer and disk space will be freed up.

And also watch a video on the topic:

Rate this article:

It tells you how to determine the optimal paging file size, what to do with SSD drives, and how to set the file size on Windows 7, 8 and 10 (as well as XP and Server - the steps are almost identical).

This article covers the following steps with pagefile.sys(and also swapfile.sys in later versions of Windows): defragmentation, migration, complete shutdown and cleanup. Does it make sense to create several paging files on Windows, on which drives is it better to place them, and what can all this lead to in terms of improving system performance.

Location and visibility of swap files

By default, the pagefile.sys and swapfile.sys files are located in the root of the disk where Windows itself is located (all system folders). Because pagefile.sys is hidden system file, by default it is invisible: you need to enable show hidden files and folders. In Windows 7, display hidden files and folders can be configured in the Control Panel.

Including invisible (hidden) files and folders in Windows 7:

  1. Press the button Start.
  2. Go to Control Panel, then to the section Design and personalization.
  3. Select “Folder Options” -> “View” -> “Advanced Options”.
  4. Select "Show hidden files, folders and drives."
  5. Click OK to save changes and exit the menu.

IN Windows 10 You can enable the display of hidden files and folders in Explorer:

  1. In the top menu of Explorer, go to the tab View.
  2. Select section Options, in the window that opens, open the tab again View.
  3. Open “Advanced options” and uncheck the “Hide protected system files” checkbox.
  4. Check the box next to “Show hidden files”.
  5. Click “Apply”, then “Ok” to save the changes.

The folder settings menu should look something like this:

Completely disabling pagefile.sys and swapfile.sys

The question of the need to completely disable paging files is equally common concern Windows users 7 and 10, when high-speed or sufficient amount of random access memory (RAM) appears. In the article about it, 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, Windows 10 this is done as follows:

  1. Right click on menu Start, select item System.
  2. In the left menu, click “Advanced system settings” (you must have administrator rights).
  3. Click Options, open tab Additionally.
  4. In the “Virtual memory” window, click on the button Change…
  5. Select a line below No swap file.
  6. Click Set, then Yes in the warning window that appears.
  7. Click OK in the Virtual Memory settings window to save 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 paging file you need:

  1. Right-click on the My Computer icon on your 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 section Performance press the button Options.
  5. Go to the “Advanced” tab again. In the "Virtual Memory" section of the window it will be written which maximum size may currently be occupying the page file.
  6. By default these Windows versions set the pagefile size equal to RAM. Click Change to set other values.
  7. Uncheck the “Automatically select paging file size” checkbox.
  8. Select item No swap file to turn it off 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.

Transfer and defragmentation (breakdown)

Transferring a paging file from one disk to another is performed on the same page where you select the file size and turn paging on/off. You can select any of the drives connected to the system, including SSD. The changes will take effect after a reboot: Windows will create new file on the specified disk when the system starts.

Interestingly, on the official Microsoft website there is only information about transferring the swap file. The article contains instructions for Windows XP; no new information has been added on this topic.

The instructions below will help you move pagefile.sys to another drive in Windows 7, 8/8.1 and 10:

  1. Right-click on the My Computer icon on your desktop and go to Properties.
  2. Select “Advanced system settings” on the left, then go to the “Advanced” section.
  3. In the section Virtual memory press the button Change(at the same time, you can set the optimal file size, focusing on the suggestions of Windows and ).
  4. Uncheck the box “Automatically select paging file size” if it was checked there.
  5. On the list Disk [volume label] select disk, select below Specify size and set the file size in megabytes.
  6. Click Set And OK to save changes. Click OK in the system message window, if one appears.

You can select several disks at once and set a different swap size in each of them. In this case, there will be multiple pagefile.sys documents that Windiws will use as it sees fit. For the average user there is no point in doing the partitioning. Defragmenting the paging file into several separate files will not speed up the system and will not provide any performance benefits.

In some cases, a minimum size file is still needed specifically for system disk, and not on a high-speed SSD or flash. This allows you to maintain the ability to diagnose the system when critical errors (BSOD) occur, since debugging data can be written there.

The file split over several disks will look like this:

Swap file on a flash drive

Separately, I would like to mention such a practice as transferring the swap file to a flash drive. Firstly, doing this is quite problematic, since Windows will not list removable storage media in the list of drives for the paging file. Secondly, even if you succeed in transferring pagefile.sys to a flash drive, it may not give any significant result.

On the one hand, the speed of USB 3.0 is really high, especially when compared with HDD:

  • USB 2.0 - up to 480 Mbps (60 MB/s)
  • USB 3.0 - up to 5 Gbps (600 MB/s)
  • SATA Revision 2.0 - up to 3 Gbit/s
  • SATA Revision 3.0 - up to 6 Gb/s

In reality, not every flash drive even works at the maximum speeds of USB 2.0, not to mention 3.0. In such a situation, from a regular flash drive you can get a write/read speed of 30-100 MB/sec or even less. Compared to HDDs, not to mention SSDs, such speeds will not provide any performance gain.

Clearing the contents of the swap file

During shutdown Windows computer erases all data that is in random access memory (RAM). Data from the paging file is not erased by default and remains on the hard drive when the system is turned off. Therefore, in some situations, unauthorized persons may gain access to the information in this file.

For security reasons, you can force Windows to delete the entire contents of pagefile.sys by rewriting all memory locations to zeros. In this case, potential attackers will not be able to get to important documents. At the same time, the owner himself will not be able to access information from the swap, including that necessary for debugging.

There are two ways to force Windows to clear the contents of the page file:

  • Using settings Group Policy Editor.
  • By changing the value of entries in Windows Registry Editor.

You shouldn’t go into the Registry Editor unless you really need to, especially if you don’t have experience working with this section of the system. First you should try to enable file cleaning using the instructions for Group Policy Editor.

This method only works for Pro- or Enterprise versions Windows:

  1. Click Start, enter in the search bar gpedit.msc and open the file.
  2. In the opened Editor group policies need to go to section Computer configuration, then in Windows configuration.
  3. Open Security > Local Policies > Settings on the left side of the window.
  4. On the right side of the panel, double-click on the policy Shutdown: Clearing the virtual memory page file.
  5. In the window that opens, select the item Turn on.
  6. Click OK to save changes. The changes will take effect after the system is rebooted.

If something goes wrong, you can use Registry editor:

  1. Click "Start", then "Run". In the window that appears, enter regedit and press the Enter button.
  2. In the registry editor that opens, you need to find the key (on the left side of the window): HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Session Manager\ Memory Management.
  3. Right click on any free space on the right side of the window, in context menu choose New -> DWORD Value (32 bits).
  4. The new parameter must be named ClearPageFileAtShutdown.
  5. Double-click on the created parameter and enter in the window that opens 1 in the field Value, click OK to save the changes.

The finished work should look like this:

You must restart your computer for the changes to take effect. Windows will then clear the contents of pagefile.sys every time the system is shut down. To disable paging file cleaning, you need to set the created ClearPageFileAtShutdown parameter to 0 , or simply delete it from the registry. After uninstallation (RMB -> Uninstall), Windows will restore the default value (no cleanup on shutdown).


Close