+4 votes
298 views
in Setting by (242k points)
reopened
pagefile.sys: all information about the Windows paging file

1 Answer

+5 votes
by (1.6m points)
edited
 
Best answer

What is pagefile.sys?
Delete pagefile.sys: possible and recommended?
Move pagefile.sys - Opportunity to improve performance

image

pagefile.sys: all information about the Windows paging file

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?

Index
  1. What is pagefile.sys?
  2. Delete pagefile.sys: possible and recommended?
  3. Move pagefile.sys - Opportunity to improve performance

What is 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)..

Note

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.

Delete pagefile.sys: possible and recommended?

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:

  1. Use File Explorer to open the drive where Windows is installed (usually C :).
  2. Go to the tab? View ? and check the box? Hidden items ?
  3. Then click on ? Options ? and then in? Change folder and search options ?
  4. Open the tab? See ? in the new window and deactivate the option? Hide protected operating system files (recommended) ?.
  5. Finally, confirm the changes in the pop-up dialog with? Yes? and then hit ? Apply ? and accept?.
  6. Now pagefile.sys should be visible directly in the browser.
image
The pagefile.sys file is only visible in Windows Explorer after you have enabled viewing of protected system files.

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:

  1. Open the Control Panel from the Start menu.
  2. Click on ? System ? (requires icon view on P control) and select? See advanced system settings ? in the menu on the left.
  3. Go to the tab? Advanced options? if it's not already open, and click? Configuration ? in the "Performance" section.
  4. In these performance settings, go to the? Advanced options ? and click? Change ? in the section? Virtual memory ?.
  5. Remove the check mark from? Automatically manage paging file size for all drives? and then select the option? No paging file ?.
  6. Click the button ? Set ? and confirm the changes by clicking "OK". Finally, restart Windows to remove the current version of pagefile.sys.
image
In? Total paging file size for all drives? you can see the size of the files (in megabytes) that are currently allocated to pagefile.sys.

Move pagefile.sys - Opportunity to improve performance

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:

  1. Open the View advanced system settings (? Control Panel? ->? System? ->? View advanced system settings?).
  2. Go to the tab? Advanced options ?
  3. Press? Configuration ? in? Performance ?.
  4. Go back to? Advanced options? and click? Change ?
  5. Disable the option? Automatically manage paging file size for all drives ? unchecking the check box.
  6. Select the data medium to which you want to move pagefile.sys, mark the option? System managed size ? and confirm the change with? Set ?.
  7. Then select the hard drive where the pagefile.sys file has been managed so far and click "No paging file".
  8. Then restart your computer.
advice

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.


...