10.09.2024
Home / Windows overview / Is it possible to delete swapfile swp. Complete configuration of the Windows swap file. Difference and belonging

Is it possible to delete swapfile swp. Complete configuration of the Windows swap file. Difference and belonging

Attentive users of the operating system have noticed that a previously unknown swapfile process is hanging in the resource monitor. Swapfile.sys is the swap file. It is physically located on the system disk, next to the files pagefile.sys and hiberfil.sys. It first appeared in Windows 8 and was used for metro applications, and then in the new operating system Windows 10. As a rule, the swapfile size does not exceed 256 MB.

Swapfile.sys, Pagefile.sys and Hiberfil.sys

Like pagefile.sys and hiberfil.sys, swapfile.sys is stored by default in the root of the system drive c:\. It's hidden. You can see it by turning on the display of protected system files in the control panel. Hiberfil.sys stores the contents of RAM when the computer is in sleep mode. Hibernation mode (low power consumption mode) also uses hiberfil.sys. When you enter hibernation mode, all open documents and programs are saved to hard drive. Pagefile.sys is used in Windows when RAM space runs out. At this critical moment, so that the computer does not freeze, but at least continues to work slowly, the system turns to this file for support. Windows stores everything that does not fit in the computer's RAM into it.

What is a swap file?

You may ask, “why do we need another virtual page file?” I will answer. With the advent of Metro-enabled applications, there is a need for a new way to manage memory other than traditional virtual memory or page files. This is how the file “%SystemDrive%\swapfile.sys” appeared. To see this file, you must, as we wrote above, enable the display of protected system files. To do this, open the menu “Control Panel” -> “Folder Options”. Next, go to the “View” tab and uncheck the “Hide protected system files” checkbox. Click "OK".

If the system does not have enough RAM while applications are running, it writes some of the information to the swapfile on the hard drive. This process is similar to the hibernation mode we described above. This mode of operation allows you to pause and resume applications, freeing and loading memory. The introduction of a new paging file allows you to achieve a more uniform load on the computer's RAM.

Let's figure out how it works

1. The Process Lifetime Manager (PLM) detects that the system is low on memory and requests the Memory Manager (MM) to free the working set of a particular process that is responsible for processing Metro style applications.

2. The memory manager moves the memory page from the application's working set to the list latest changes operating system pages (the contents of this list are written to disk)


3. The working set of pages are written asynchronously to the modified list page, as prescribed by the memory manager policy (written intelligently in the background, the write is triggered when there is insufficient free memory)

4. Even after the application is stopped, the working set is written to disk. Memory pages removed from the process will remain intact in the operating system's waiting list. Essentially it's a cache useful pages memory, which, if necessary, can be reassigned to other applications. If the original application needs these pages, they will be quickly returned.


If the user switches to an application while the working set of pages is in memory hard drive(on a modified list or waitlist page), the pages will be immediately added to the application process. If pages are no longer available, Windows will load the application's working set from disk in optimized mode.

Can I remove Swapfile.sys?

The size of the swapfile.sys file is actually not large and, as a rule, does not exceed 256 MB. We do not recommend that you delete this file. By deleting swapfile, you will automatically delete pagefile. Remember that disabling the page file can greatly affect the performance of your computer.

You still decide to disable the paging file. Open the "Start" menu, select "View" -> "Customize" appearance and Windows performance."


In the Performance Options menu, go to the Advanced tab and click the Change button in the Virtual Memory section.


Uncheck "Automatically select paging file size on all drives." Select the system disk and click “No paging file” -> “Install”. The pagefile.sys and swapfile.sys files will be deleted from the selected drive after the system is rebooted.


In order to re-create paging files, select the disk on which we will create the files and click “Size by system” or “Specify size”.

Let's figure out what swapfile.sys is| 2015-08-28 12:15:21 | Super User | System software | https://site/media/system/images/new.png | Attentive users of the operating system have noticed that | dr.web journal key, windows settings, write protection

On all or almost all resources on which I saw this question asked, the answer was almost unchanged: “impossible.” In fact, this is not entirely true.

For reference:

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

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

Unlike the swap file, the Windows interface does not provide tools for managing the location of the reincarnated container.

The reasons for moving 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
  • an attempt to maximize free space on the system disk
  • centralized storage of all waste material on a separate section

How to do this? Easy, yesinstructions 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 paging file on ALL windows partitions.

Do not forget to confirm each action in this window by clicking the Set button for each disk where we disable FP. The checkbox “Automatically select paging file size” should be unchecked.

Stage II : as an administrator, launch the command line and execute the command

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

where k: is the letter of the destination partition where the file will be located. The point is that we replace the original with a link to it - physically it will be located on the specified disk, but the system will be sure that the location of the file is unchanged. The link will be located on the system disk and will not take up disk space.

For reference:

The easiest way to find the command line in the desired form is by pressing the Win+X key combination and selecting " Command line(administrator)", confirm the action if necessary.

Stage III : enable the swap file, placing it anywhere.

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

At one time I did a similar operation myself, for the transfer I used the capabilities of the Total Commander plugin - ntfslink, from the PE environment. It works both ways.

While working in Windows 8-10 (for example, opening a large number of graphic editors or running the game with elevated system requirements) may run out of space in physical RAM. Therefore, in order running games and applications did not crash, in the OS there is 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. On the operating system in question 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.

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 « 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 "swapfile.sys" the system moves some types of data that are not currently in use. For now, this file is used for so-called data universal applications(formerly Metro). Perhaps other data will be recorded there in the future.

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 “Hide protected operating system files” 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 entering sleep mode. It is also used for new feature“Hybrid boot”, thanks to which the launch of Windows 8 and 10 was significantly accelerated. And the file “pagefile.sys” is designed to unload data from RAM when space in it runs out.

Why is the "swapfile.sys" file needed?

There is little official information from Microsoft on this matter, but we can compile an answer from publications on the forums and on the company’s blog.

In short, the “swapfile.sys” file is used to upload data from new applications, which in official terminology have changed their name more than once: universal applications, Store applications, Metro applications, modern applications, Windows 8 applications, style applications 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 fact is that with the advent of modern applications we needed new way managing their memory beyond the traditional method of using virtual memory/swap file.


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


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

Additional details are provided by Microsoft employee Pavel Lebedinsky:

Pausing/resuming a Metro app is just one use case, and there may be others in the future.


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


In short, the standard page file is used for normal Windows tasks, and Microsoft's new application framework uses a separate file to intelligently upload new application data.

How to delete the file "swapfile.sys"?

This file is not big at all - it 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 volume internal storage– after all, the file “swapfile.sys” most likely allows you to increase the performance of the device.

The file "swapfile.sys" is managed in conjunction with "pagefile.sys". When the latter is disabled, “swapfile.sys” is also disabled.

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

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

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

After this, it is possible to recreate the page file on another drive, and then Windows will store all virtual memory files there. This allows, for example, to extend the service life solid state drive by transferring swap files to a mechanical hard drive.