Hiberfil.sys, Pagefile.sys & the New Swapfile.sys file in Windows 10/8

The Windows operating system contains several system files required for its proper functioning. Some among them which raise a lot of curiosity are Swapfile.sys, Hiberfil.sys & Pagefile.sys. To see these system files on your System (C) Drive root, you will have to un-hide protected operating system files from Folder Options. In this post, we will briefly talk about each file.



Hiberfil.sys file is a system file that is used by Windows to support Hibernation. If you have enabled Hibernation in Windows 8 / 10, you will see this file.

Read: Disable, Enable Hibernate in Windows 10/8.

When you have Hibernation, and subsequently Fast Startup enabled (which is the default setting), your Hiberfil.sys file will be approximately 3/4th of your RAM. So you can see that the Hiberfil.sys file in my case is 6.6GB since I have a RAM of 8GB. In case you have disabled Hibernation, you will find its size roughly equalling your RAM.

In Windows 8, you will not find the size of Hyberfil.sys running wild when you have Hibernation enabled. In the earlier version of Windows, the hibernation file stored the kernel session, device drivers, and application data. In Windows 10/8, the hibernation file stores the kernel session and device drivers only, as a result of which the size remains more or less constant.

Disable Hibernation

If you wish to, you can always disable/enable hibernation manually or by using our Ultimate Windows Tweaker,  or a Microsoft Fix It. But then remember, that in Windows 8 / 10, this will disable Fast Startup too.


Pagefile.sys or the Page File is the computers paging file which your Windows uses as Virtual memory. The PageFile.sys holds objects in an over-used memory that have not been accessed for a long period of time. When Windows runs out of physical memory, it resorts to using the Page File, by writing some of the contents of RAM on to the disk. If this ‘Paged out’ memory is needed back, some other part is written to disk, and this part is read back. You can read more on Paging Files at TechNet.

If you often get a message Your system is low on virtual memory, when you try to start any memory intensive application, you may want to increase the  Paging File size. The size of the Page file on my Windows 8 PC is around 1.2GB.

Delete Pagefile.sys

Cleaning the Page file on every shutdown means overwriting the data by zeros, and it takes time. This will increase shutdown time. But if you work on confidential documents, then you may want to have this setting ‘on’. When you load such documents, they are loaded into RAM. To save RAM Windows places certain items in the pagefile. Hence you may want to delete pagefile at every shutdown, in such cases. To do so open Regedit and navigate to the following key:

HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Session Manager\ Memory Management

In the right pane, select New > DWORD (32-bit) Value. Name the DWORD value ClearPageFileAtShutdown and give it a value of 1.


In earlier versions of Windows, you had Swapfile.sys or the Swap file. The Swap file holds objects which have been ejected from memory and are not expected to be accessed for some time and allows an operating system to use hard disk space to simulate extra memory whenever the system runs low on memory, by swapping section of RAM that an idle program is using onto the hard disk to free up memory for other programs. This combination of RAM and Swap files is known as Virtual Memory. Having a swap file makes your computer’s operating system “have” more RAM than it actually has.

The Swapfile is not used in the fast startup process of Windows 8 / 10. It is the Hiberfil.sys file which stores the kernel session and comes into play here.

In Windows 8 / 10, you again get to see Swapfile.sys! This latest version of Windows has both – the swapping as well as the paging file at the same time. It is around 256 MB in size – in my case, it is 262 MB.

Why do we need another virtual page file in Windows 10/8?

The Swapfile.sys in Windows 8 is a special type of pagefile used internally by the system to make certain types of paging operations more efficient. It is used to Suspend or Resume Metro or Modern Windows 8 apps.

TechNet explains the ‘new’ Swapfile.sys in Windows 8 as follows:

With the introduction of the Modern App, we needed a way to manage their memory outside of the traditional Virtual Memory/Pagefile method. With that, the “%SystemDrive%\swapfile.sys” was born.

Windows 8 can efficiently write the whole (private) working set of a suspended Modern app to disk in order to gain additional memory when the system detects pressure.  This process is analogous to hibernating a specific app, and then resuming it when the user switches back to the app.  In this case, Windows 8 takes advantage of the suspend/resume mechanism of Modern apps to empty or re-populate an app’s working set.

I hope this explains the reason why we see all the three files viz. Hiberfil.sys, Pagefile.sys & Swapfile.sys files in Windows 10/8.

Looking to learn more about other files or file types or file formats in Windows? Check these links:

Windows.edb files | Thumbs.db files | DLL and OCX files Index.dat file |NFO and DIZ filesDesktop.ini file | Nvxdsync.exe.

Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.


  1. Jay Stephens

    Wow, so to handle the “new” Metro/Modern apps it’s back to the future using a very old Windows file name and yet another file writing over and over to my SSD drive wearing it out before it’s time. I have moved my page file off my SSD, but there is no way to do that with swapfile.sys, great move (NOT) MS.

  2. Is it possible to move the hiberfil, pagefile and swapfile to a different partition? My Windows 8 partition is very quickly running out of space, and I’d like to get some back. I have a separate partition with plenty, but I’m not sure if Windows will let me move it without freaking out. Can I patch it through with symlinks, or would that break something?

  3. James M

    I have 32gigs ram so hiberfil is almost 27gig and a 5 gig page file on a ssd drive at that, how does that even make sense? i can see matching low amounts of ram, but 27gig hiberfil? really?

  4. Kaziform .

    An SSD does not “wear out”. Also, the best place and the best performance for a paging file is on your SSD. Great move (NOT), Jay Stephens.

  5. uhohspagettios

    Are you kidding me? Of course SSDs wear out. Each cell has a finite number of reads/writes, and swapping wears down on this substantially.

  6. Jow Caruso

    you can set your hibernation file size smaller, search on google for that, its a very simple command 😉

  7. Christopher Gibson

    Yeah that hiberfil.sys file is ridiculous. It is a massive waste of space and the size it can grow is unreal. I believe it’s 3/4 the size of your ram and really only needed if you want to save some life of a laptop battery and a quicker bootup. It has screwed me right in the middle of downloading battlefield 4 dlc 34 gig download. I never have hibernation,sleep,turn off display,turn off hard drives,etc enabled. Also with these rumours of wearing out your solid state drives. Each sector in an SSD averages 100’s of terabyte read n writes in it’s life expectancy.
    Open your command prompt and type…….powercfg.exe -h off…….and hit enter. Your massive hiberfil will be gone and you’ll save some more space for your needs. It is totally retarded that a file with that size is even designed by windows and created and left on your drive when hibernation is not used. I had a 100 gig ssd that I was using just for windows and speed. All games n programs except one were installed on the slave disk drive. I had a hiberfil with exact same size as yours and it screwed a day long download from EA right at the end it said disk full. I used the above command and redownloaded and tower is flyin. Kill that stupid file.

  8. Neo

    You can use MKLINK command to move the swapfile.sys and pretty much and file/directory to an alternative drive if need be. I use this for apps that don’t allow for a custom drive installation, once installed, move the directory across to the drive and MKLINK where the directory used to be.

  9. TustCo

    SSDs DO wear out! In fact, single cell endurance has gotten WORSE over the past decade as SSD technology has advanced! This is because we have smarter SSDs that distribute write cycles over the entirety of the device. HOWEVER, as your SSD nears capacity, things like PageFile, HyberFile, and SwapFile tend to sit on the same (it will be the set of cells in unused space) cells (NAND/ MLC/ or whatever tech), quickly deterioating the state of the SSD, and taking it ever closer to it’s end of life. This can be offset some by SSDs that move information around to account for this, but this still puts a lot of stress on your SSD. Microsoft really needs to have options for individuals who have extremely high end machines with ample RAM such that the system will not use Page files or Swap files by default. My computer has 64GB of RAM, I don’t need a Page File or Swap File in most cases, so why is Windows using them?

  10. J Quest

    Why is it that after 20 years we still see statements like this:
    “Pagefile.sys or the Page File is the computers paging file which your Windows uses as Virtual memory.”

    The paging file is not virtual memory. This falsehood made its way into Windows (95?) as a callout in one of the advanced system properties panels. And it has been perpetuated in lore ever since.

    But it is just as false today as it was then. The paging file is not virtual memory! It is just … the paging file.

  11. JNinMN

    What? DISabling hibernation results in a Hiberfil.sys file 33% LARGER
    than ENabling it? Are you sure about that? That doesn’t make any sense
    to me.

  12. Brian Gregory

    Please explain more.
    What do *you* mean by Virtual Memory?

  13. Brian Gregory

    Of course SSDs wear out.
    But you can leave those files on your SSD as long as you have enough RAM so that swapping is a rare occurrance.

  14. Tim

    ^^^I did this, and it’s awesome when it works. But Windows Updates can FUBAR your system, so I don’t use it any more.

  15. nicu78

    You are clueless dude.

  16. NahNood

    Damn with that much ram why not use a startup util that moves your page file to a ram disk. 🙂

  17. NahNood

    umm.. just delete the file once hibernation is disabled.

Leave a Reply

Your email address will not be published. Required fields are marked *

5 + 9 =