Hiberfil.sys, Pagefile.sys, and Swapfile.sys. What is the Purpose of these three files?

In the root of the your Windows drive are three hidden files. These files are:

  1. hiberfil.sys
  2. pagefile.sys
  3. swapfile.sys

hiberfil.sys

The Hibernation File is a file used by the Hibernate feature found in Windows. When you press the Hibernate button in Power options button in Windows Start Menu, it transfers and saves all of the currently active data on your RAM into the hiberfil.sys file placed on your Hard Disk Drive (HDD), and then shuts down your system. When you (re)start your system, Windows recovers your previous session from the hibernation file hiberfil.sys, and turns it into an active session. The currently active data is the data that all the applications store on your RAM while they are running. The hibernate feature transfers the data from RAM to HDD. This is done to protect the data of the currently active programs; RAM is Volatile in nature, a Volatile Memory loses all of its contents when it is shutdown. On the other hand, the HDD storage is non-volatile in nature; the data stored on a Non-Volatile Memory does not lose its contents when it is shutdown.

pagefile.sys

The Pagefile or Paging File is an important memory management feature found in Windows. The most visible application of a Page File can be seen on the systems with low amount of RAM. So, if an application is taking too much of your RAM, and the total amount of data or contents of active applications exceed the amount of RAM, then in order to make space for the active application, Windows transfers the least used or inactive data or pages to the Page File pagefile.sys. This way, only the data related to the most active application remains in the RAM. This transfer takes place in order to prevent applications from crashing when there is not enough space for these applications to store their data.

swapfile.sys

The Swap File made its debut in 2012 with the release of Windows 8. swapfile.sys is like a companion file to the pagefile.sys. The swapfile.sys stores only the data related to the Windows Store Apps. So, a Page File stores all of the contents related to Traditional Software, and the Swap File stores the data related to Windows Store Apps.