If you are low on disk space, removing unnecessary files is a priority. Although in most cases this type of cleaning is very useful and necessary, it is also essential that important system files are not removed . For this reason, many of the files that ensure the proper functioning of the operating system are hidden by default and require special access controls ..
On Windows operating systems, these files include the pagefile.sys paging file, which is used as part of memory management . What exactly does this file consist of and why is it generally not recommended to delete pagefile.sys?
pagefile.sys is a paging file ( pagefile) on Microsoft Windows operating systems. This file, generated and managed automatically by the system, has the sole function of freeing up RAM when running programs or processes that are especially intensive for the computer. To do this, if data cannot be stored in available RAM, Windows first expands the addressable memory of the system. The system can then map the relevant data to this additional address space and move it to pagefile.sys.
In the case of applications, it does not matter whether the data is temporarily stored in pagefile.sys or in physical memory. However, access to the paging file is much slower for technical reasons, resulting in a significant loss of performance if large amounts of data are deposited in pagefile.sys. Depending on the workload and the version of the system, the file size can vary from a few megabytes to more than a gigabyte. The latter is the default for Windows 10's pagefile.sys (on most devices)..
The size of the paging file is always dynamic , as it depends on current memory requirements. However, many applications store data in the paging file even if there is still enough memory available. Typically, this occurs by minimizing a program to increase the storage quota for all currently active applications and processes. You can also manually set a fixed maximum size.
Since the paging file requires a lot of memory space, in some cases it is possible to wonder if it is not better to delete the pagefile.sys file, especially in the case of devices with very limited storage capacity (usually laptops). However, we do not recommend it: the Windows paging file is programmed for the storage resource management described above, so its absence can minimize system performance or even lead to a system crash in Windows. The same is true for programs that use pagefile.sys by default, even if there is space in RAM.
Isn't it on a whim that Microsoft has classified the paging file as? protected system file ? that for example pagefile.sys cannot be seen in Windows 10 until you have performed the following steps:
If, nevertheless, you want to delete pagefile.sys in the usual way, you will find that this is not possible: you will get the message that the paging file is? being used by another program ?, since Windows and other applications actively access the file during its execution..
However, if you have administrator rights, you can remove the paging file from your system by disabling the memory management feature and restarting Windows. For example, to disable and then delete the pagefile.sys file in Windows 10 you should do the following:
If you use multiple hard drives, you won't have to delete the pagefile.sys if you run out of space: in this case, you can also move the paging file to another data medium . This can be particularly advantageous to lighten the load on an SSD hard drive in this way and free up valuable SSD memory. Furthermore, read and write accesses to the pagefile.sys also take place on the alternative data medium, thus slightly improving the overall performance of the system.
To move the pagefile.sys file, follow these steps:
In the virtual memory settings you can also define an individual minimum or maximum size for the pagefile.sys file. For this, you just have to click on? Custom size ? and indicate the desired values (in megabytes). However, the size of the paging file must not be less than 16 MB. As with moving and deleting the pagefile.sys file, the option "Automatically manage paging file size for all drives" should be disabled.