-2

what is the difference between hyberfil.sys, swapfil.sys, and pagefil.sys?

I need to know whether or not these large files are slowing down the booting process, and I need to know whether or not it is safe to delete them.

  • 1
    http://www.thewindowsclub.com/hiberfil-pagefile-swapfile-sys-windows – Ramhound May 19 '17 at 01:04
  • You can disable the page file, swap file and hibernate file if you want but doing so disables their functionality. Without a swap file UWP application wouldn't work and without a hibernate file you couldn't hibernate your system or do hybrid shut slowdown and without a page file your system performance would be effected – Ramhound May 19 '17 at 01:08
  • check my [answer](https://superuser.com/a/1202807/174557), it shows how to trace boot. hiberfil.sys = hibernationfile, swapfil.sys = pagefile for store apps – magicandre1981 May 19 '17 at 14:04

1 Answers1

1

They're not slowing down the booting process, and it isn't safe to delete them. Making them smaller won't make booting any faster.

The pagefile is used to hold private committed virtual memory that the OS has decided to evict from RAM... and to read it back in again if it's ever needed. This is typically done a few pages at a time (4KB each). Since the advent of compressed memory in Windows 10 it is used less than it used to be. It is possible to delete it, or make it smaller, but this risks programs hitting "out of virtual memory" errors.

n.b.: Getting rid of your pagefile will not "turn off virtual memory" nor eliminate paging to or from disk.

The swapfile is used for rollout/rollin of Windows Store Apps. This is sort of like paging, but it's done to entire processes at once. I doubt seriously that any of this is going on during bootstrapping. In any case the only parts of the file that are accessed are those of the total size large enough to do the work; the fact that the file is bigger than that does not hurt performance - it's not as if it's ever read or written from one end to the other.

The hibernate file is used when you hibernate - i.e. suspend-to-disk - your system. It needs to be size of RAM or it won't work. It isn't used at all during a fresh boot.

Jamie Hanrahan
  • 23,140
  • 6
  • 63
  • 92
  • though... what IS the difference between pagefil and swapfil? – Blaine May 19 '17 at 00:40
  • @Blaine answered. LMK if there's anything else! – Jamie Hanrahan May 19 '17 at 00:44
  • 1
    Jamie Hanrahan is right, and let me add that you _can_ delete hiberfil.sys if you've booted into another environment, ie to save space when imaging your HDD. Windows will not care and will re-create it upon startup if Hibernate is turned on. The files usually can't be deleted when Windows is running but it doesn't matter because they aren't responsible for your lagging startup. – DoaJC_Blogger May 19 '17 at 01:03