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 RAM when the computer is in sleep mode. Hibernation mode (low power consumption mode) also uses hiberfil.sys. When entering hibernation mode, everything open documents and programs are saved on 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" 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. Dispatcher life cycle 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, which 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 (contents this list 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 in a rational manner in background, recording 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 is a cache of useful memory pages that can be reassigned to other applications if necessary. 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 | journal key dr.web, windows settings, write protection

Let's take a look at the files Swapfile.sys Hiberfil.sys Pagefile.sys: what is it used for, what function do they carry, and what important role do they play in the performance of your computer?

Swapfile.sys Hiberfil.sys Pagefile.sys: one “extra”?

In the operating room Windows system the lack of system resources is actively supported. The system accesses it (if it is created) at the moment when the RAM ceases to cope with the assigned tasks, or rather, to redistribute RAM resources.

In addition, in Windows, by default, it is set, which allows you to save all “kernel” processes (from the Windows kernel side), as well as those running from the outside, directly to the hard drive. After pressing the start button of the computer, this file helps the system boot faster than with a normal boot from scratch. The file is called hiberfil.sys.

______________________________________________________________

It would seem that everything is simple and clear. However, with the advent of Windows 8/10 the situation became a little more complicated.

AND pagefile And hiberfil are firmly registered in the system as long as the paging file functions and quick launch:

But, as can be seen from the last picture, the hibernation mode (and therefore the file itself) is firmly tied to: there is no quick start - hibernation does not work. Although the file itself hiberfil will remain in place until you forcefully get rid of it (command in the paragraph below). And just like that with quick start at Windows users 10 there are constant problems: it is the cause of many system bugs ( File Explorer loses navigation functions, taskbar does not work, etc.).

Next. If set all settings of specified functions and functions to default, a characteristic fact is observed: hiberfil takes 70-75% RAM, and pagefile the rest go to 25-30% . Apparently, the hibernation mode requires a lot of resources to unload kernel drivers and applications, but the system takes these resources from the page file. Remove hiberfil.sys(for this purpose, in the Shell, enter the command

powercfg.exe -h off

the file should disappear) and look after a while at the page file. The value chosen by Windows will be close to the size of the physical RAM. However, everything depends on the actual amount of RAM: the lower the volume, the larger the “virtual memory” will be in percentage terms.

pagefile grows after disabling fast startup and virtual memory autotuning

What's the end result?

What is the conclusion from this? Unless you are a laptop user who is constantly at risk of losing data due to a dead battery, it is better to abandon hibernation in favor of a paging file, which is much more useful. In any case, remember about the distribution of computer/laptop resources when the fast startup function is activated: it consumes a lot of resources. Only owners of “top” assemblies can boast of its problem-free operation.

What does swapfile.sys have to do with it?

With the first two, the situation has become more or less clear. What is it swapfile.sys? Its function is similar to the paging file, however, the action was initially aimed at applications from Windows Store. But not only that. And despite the similarity in purpose, they have different algorithms.

During a Windows session, both files are considered: pagefile And swapfile. And the first contains information about programs that a long time ago user didn't start and which can be “taken to the warehouse” - we can only regulate its dimensions. And in the second - information about the applications that specifically not enough RAM. Do you feel the difference? However, both files work differently on different builds: pagefile has proven itself on productive machines, the second one should be used more often on aging computers or tablets running Windows control. And don’t forget that both files are primarily hard drive space. This means that both are susceptible to fragmentation, and this process is almost instantaneous, and the huge allocated sizes for files can gradually disappear due to fragmentation. The description described is a starting point for solving performance problems and .

Swapfile.sys Hiberfil.sys Pagefile.sys: conclusions

We have learned that Swapfile.sys Hiberfil.sys Pagefile.sys play an undeniable role in system performance. However, each of them performs its function in its own way, which depends on the state of the system as a whole and the hardware capabilities of the computer. So remember - the functions provided to optimize Windows may not work or may not work to their full potential. Maintain the system in good condition.

Some users examining system files on the C drive in Windows 8.1 and Windows 10 pay attention to a certain file called Swapfile.sys.

It is usually small in size, but its purpose is of some interest.

In this article we will tell you about this file and you will find out why Swapfile.sys is needed on the system drive C.

What is Swapfile.sys for?

Just like , Swapfile.sys is . That is, files and data are downloaded into it running programs and games that do not fit in RAM.

Many may have a completely appropriate question - why two swap files?! Microsoft gives the following answer on this matter.

The fact is that all new modern applications use a slightly different algorithm for working with memory. The usual page file Pagefile.sys works like this - you launch a program or game, it is loaded into RAM. Everything that does not fit there is loaded into the swap file.

Swapfile.sys works differently. You start the game. At the same time, of course, something is already running - antivirus, browser, Skype, some background system services, conductor. Some of the game files do not fit into RAM. And now the system, instead of loading the remaining game files into the swap file, uploads background files there running applications, which you are not currently using, but continues to download game files into the free space.

All this gives more fast work demanding applications. After all, now it is not they that are loaded into the swap file, but what you are not currently using. This is the system.

Should you delete Swapfile.sys?

Definitely not! After all, its size is usually about 250 MB. By deleting it you will not, but you will reduce the performance of your PC.

If for some reason you still decide to delete this file, then you can do this entirely with the swap file.

Users first noticed the new element swapfile.sys in the Windows 8 operating system. It is necessary to increase the amount of virtual memory for storing temporary application files.

What is this file

Windows has several system files that improve system performance. So, Hiberfil.sys is intended for information storage when the system enters sleep mode. Information about everyone open programs and applications are transferred from RAM to the computer’s hard drive. Thanks to this, the device consumes less energy.

Pagefile.sys stores all information at the moment when RAM is out. Swapfile.sys in Windows 7, 8, 10 is also swap file. It works with Metro apps. If the user minimizes the program and does not work with it for some time, then it will not use system resources. Instead the information will be saved on your hard drive. Thus, the number of open tasks will have minimal impact on the overall performance of the device.

The moment the user wants to return to the minimized program, all information will be loaded from this swap file. It will move from the hard drive to RAM to increase operating speed.

Another advantage of this method is that while working on the computer there will be more RAM. This happens because unused information is downloaded to the hard drive.

The operating principle is as follows:


Where is the file located

Swapfile.sys is located on the system partition of the computer. This is usually drive C. Even though the document is located at the root of the folder, the user may not notice it. The fact is that it is hidden, like other system elements.

To display, go to control Panel, then select folder options. In the " View"You should uncheck the box" hide system files" After this you need to click on “ OK" and system documents will be displayed, including swapfile.sys.

How to remove and is it possible to do this?

Delete swap files not recommended. This can cause the device to start working much slower. If the system document swapfile.sys needs to be deleted, then it is worth remembering that it is deleted along with Pagefile.sys.

To delete, you need to right-click on “ My computer» and go to properties. In the open window you need to select “ additional options systems».

Then you need to go to the “ Additionally» and open parameters speed.

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 page file, in windows interface There are no tools provided to control 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
  • 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.


Close