What are HIBERFIL. SYS and PAGEFILE. SYS?

HIBERFIL.SYS AND PAGEFILE.SYS are system-generated files. They are used by Windows for hibernation and virtual memory control.

HIBERFIL.SYS

HIBERFIL.SYS is a file the system creates when the computer goes into hibernation mode. Windows uses the file when it is turned back on. If you don’t need hibernation mode and want to delete the file you need to turn the hibernation option off before Windows will allow you to delete the file. The procedure for turning hibernation off differs markedly between Windows XP and Vista. The file size depends largely on the size of active RAM in the computer as the contents of the file are basically a RAM image.

  • Windows XP

  • Procedure for Windows XP. This procedure makes use of the graphical user interface.
    • Start | Control Panel | Power Options
    • Go to the Hibernate Tab.
    • Uncheck the Enable Hibernation box if you don’t need the hibernation function.
    • The file should now be able to be deleted.
  • How to Troubleshoot Hibernation and Standby Problems in Windows XP. See this Microsoft Knowledgebase article.
  • Windows Vista and Windows 7

  • Procedure for Windows Vista and Windows 7. This procedure requires that you be an administrator and uses the command line.
    • Start | All Programs | Accessories
    • Right click on the Command Prompt entry and choose Run as Administrator from the context menu that pops up (OK any UAC queries about doing this).
    • A Command Prompt window should open.
    • At the command prompt (where the flashing cursor is) type powercfg.exe /hibernate off and press the Enter key.
    • The box should flash and you’ll be back at the Command Prompt; type exit and press the Enter key to exit the Command Prompt mode.
    • Hibernation should now be turned off and the file HIBERFILE.SYS deleted. If you want to turn it back on repeat the procedure and use /hibernate on instead.
    • More Information: Microsoft Support documentWeb Link. A method of doing this using the graphical user interface is available using the Disk Cleanup Wizard. See the writeup hereWeb Link for that if you absolutely refuse to use the command prompt.
  • How to Troubleshoot Hibernation and Standby Problems in Windows Vista. See this Microsoft Knowledgebase article.

PAGEFILE.SYS

PAGEFILE.SYS is the virtual memory file Windows uses. Typically, on install, Windows sets the size of the file at around 1.5 times your physical memory size however this size will vary depending on the amount of free space on the disk when the file is established and other factors. Most will find the default size works fine but it can be changed. Windows uses this file for its normal operation however if you really need the space you can delete it after turning the virtual memory option off but be aware that this can cause extreme instability in Windows to the point where it might stop so do this at your own risk

  • Windows XP

  • Procedure for Windows XP.
    • Start | Right Click on My Computer | Select Properties from the menu
    • Select the Advanced Tab
    • Select Performance Settings
    • Select the Advanced Tab
    • Under virtual memory use the Change button to either set the size you want or turn it completely off. Note that if you turn it off or make the value too small you may notice a system slowdown or Windows may stop. Windows wants to use this file and if it’s set to zero then in addition to a slowdown while running, on system shutdown you may think Windows has hung due to the extra time involved. You may have to experiment a bit if you set it lower than some minimum. The best advice would be to leave the file alone. The Elder GeekWeb Link has a tutorial on the paging file that describes how to change its size in more detail.
  • Windows Vista and Windows 7

  • Procedure for Windows Vista and Windows 7. You must be an administrator to make these changes.
    • Start | Right Click on Computer | Select Properties from the menu
    • Select Advanced System Settings from the left menu.
    • Under Performance click on Settings
    • On the Advanced tab you’ll find the Virtual Memory area. Select the Change button to either set the size you want or turn it completely off. Note that if you turn it off or make the value too small you may notice a system slowdown or Windows may stop. Windows wants to use this file and if it’s set to zero then in addition to a slowdown while running, on system shutdown you may think Windows has hung due to the extra time involved. You may have to experiment a bit if you set it lower than some minimum. The best advice would be to leave the file alone. See the Elder Geek link above for a general discussion of virtual memory and its interaction with Windows.

Comments from the original 5/26/09 posting:

Darren
Said this on 2009-08-31 At 09:03 am
Thanks very much for a simple and easy to understand explanation and method…I was wondering about those massive files and now I know I can get rid of hiberfil and not pagefile!!!

#5
Mayson Arnagiri
Said this on 2009-10-06 At 07:33 am
Good Day
The above was done on a Lenovo X61s laptop. Once completed, I tried enabling the hibernation feature when logged as admin.
Once clicking “apply” the tick is dlt of the checkbox.
Can this be a virus infection on the *.sys file?
Might be that a virus linked up with the HIBERFIL.SYS or the PAGEFILE.SYS
Hows about an answer for this.
#6
DaBoss
Said this on 2009-10-06 At 11:04 am
In reply to #5
A virus sounds unlikely but I assume you’ve used anti-virus software to do a scan. Does your admin account require a password to log on? If not that could be the problem. Windows restricts ALL accounts with no password in what the user can do. Also, there is the possibility that you don’t have enough disk space to recreate the hibernate file.
#7
Mayson Arnagiri
Said this on 2009-10-06 At 11:17 pm
Thank you
McAfee was run on machine, nothing was detected
There is enough storage space on the machine due to it having 160 GB Hrd drve.
Can i then delete the hiberfile?
When running on SAFE mode, windows doesnt enable hibernation feature. I thought it was the power manager driver that was at fault, highly unlikely.
In a task, logged with any profile: ticking the “enable hibernation” and then “apply”, this automatically unticks the box again.
This is a tricky one, as its the first of its kind for me.
#8
DaBoss
Said this on 2009-10-06 At 11:27 pm
In reply to #7
As I recall, in SAFE mode Windows has no hibernate mode and so from SAFE mode you should not be able to do anything to it via the graphical interface. I’m not certain what else to suggest so I’ll take the easy way out and refer you to Microsoft. They have an article about troubleshooting hibernation here: http://support.microsoft.com/kb/907477/ (you’ll have to copy/paste as I don’t allow links in the comments). Good luck.

#11
Dmitry_Bond
Said this on 2009-11-01 At 01:40 am
The problem with PAGEFILE.SYS on Vista is – even if paging is turned off at all Vista still locking that file and left it without changes. Quite stupid Vista functionality as for me.
And quite stupid that Vista still wants a HUGE pagefile on 4Gb memory.
Thus, seems the only solution is to boot computer from other OS (or from recovery CD) and delete that file manually. 🙁
#12
DaBoss
Said this on 2009-11-01 At 01:28 pm
In reply to #11
If you insist on deleting the file (you really should let Windows have its paging capability) you can try Unlocker to unlock the file in order to delete it…

http://ccollomb.free.fr/unlocker/
#13
Dmitry_Bond
Said this on 2009-11-01 At 03:59 pm
Could anybody recommend article explaining – WHY(?!) Windows Vista wants pagefile having size equal or greater than size of RAM?! Othewise (if pagefile is smaller) it hanging for 30-40 sec every 2-3 min! :-(((

I can agree with it if RAM size is less than 1-2Gb but I have 4Gb RAM – I belive that must be enough for stable OS work without the huge pagefile!
Perhaps also can agree if there are “heavy” applications running. But it is not the case – there were only Windows Explorer + Outlook + Borland Delphi 7 – nothing also! That has very low memory consumption.

I have tested pagefile size = 200Mb, 512Mb, 1024Mb, 1536Mb – all variants works unstable, computer constantly hanging! :-\

Crazy stuff! I have 4Gb of RAM and that stupid OS cannot work with pagefiles smaller than 3.2Gb! What the ….? Does everybody knows the reason?
Note: question is not to the 3.2Gb size, but – why it wants SUCH BIG pagefile?
#14
DaBoss
Said this on 2009-11-01 At 06:56 pm
In reply to #13
Assuming 32-bit Vista, the OS itself will only use and be capable of addressing about 3.5GB of the 4 you have. The rest may be used for drivers and the like but is not available for general use by the operating system (why most Windows 7 installs are recommended as 64-bit; although that creates a set of problems all its own). Creating a page file at least the same size as memory (if not more) is fairly standard with XP and Vista. Not having one is known to create memory holes as programs bring things into and out of memory for their operation and eventually these holes cause more general problems unless they are managed. The page file system is designed to help with this management.

Why your particular system with those things running slows so much I would consider a mystery as I’m not familiar with the needs of the programs. Perhaps the compiler uses quite a bit and Outlook has never been known to be nice. 🙂

One way to speed up operation with a page file is to put the page file on a different drive than the boot drive so the operating system and page file operation are not competing for the same drive controller and the drive itself therefore does not work as hard. (The Elder Geek article referenced above has details on that.)

#18
Jan
Said this on 2010-01-28 At 02:47 pm
This was very informative, TY I looked and saw my HD was almost used up on my laptop. 15gb left of 69.6. This is not possible. i do not have any sw added and very small files. I clicked on c and saw pagefil and hiberfil were big. so i followed the hiberfil delete instructions..ty. But, it now says 17gb left of 69…what is taking up my harddrive. how can i fing out. i deleted programs …again minnute is size. windows vista home premium acer laptop 32 bit ram. ty for help
#19
DaBoss
Said this on 2010-01-28 At 09:44 pm
In reply to #18
Hard to say without looking at the whole disk directory in sorted order but if you have lots and lots of small files keep in mind that each file will take up however many full sectors needed even if the last one of those is almost empty. If the sector size allocated by the FORMAT command is large then each small file will take up that large size even if it’s only a single byte in physical size.

If you have lots of files you don’t use very often consider zipping them together into a ZIP archive that Windows will handle like a folder. That way they are all in a single file with much less wasted space and when needed individual files can be pulled out of the archive, modified, and inserted back into it by dragging and dropping in Windows or by using a ZIP archive program of some sort.

[Added: For file size finding software see: http://lifehacker.com/5146605/free-disk-analyzer-finds-the-largest-space+wasting-files]
#22
steve
Said this on 2010-06-02 At 04:55 pm
In reply to #18
One hidden culprit that uses up disk space is system restore. While it is a useful program and can really help out, it needs to be cleaned up periodically. When doing a disk clean up, be sure to check the other options, one of which is deleting all but the most recent system restore points. If you’ve been running your computer for quite a while, these file stack up and can take an amazing amount of disck space. The total space allowed can also be set by clicking on “My Computer”, going to the sytem restore tab and set a limit from there.

#29
tanuj kumar
Said this on 2010-10-20 At 01:59 pm
tell any software to delect hiberfil.sys and pagefile.sys

[Assume you mean delete and that would be a BAD idea because of the caveats noted in the article. –DaBoss]

#32
morteza
Said this on 2011-10-05 At 06:14 am
Thanks , i was trying to delete’em in Linux and i was thinking that they some kind of virus. and i just got into many problems by this.

#34
Talha
Said this on 2012-01-18 At 12:50 am
This is just lame. The file does’t get deleted…you get it right back as soon as you turn hibernate on…
How do we actually delete this dump file is the real question.
Any ideas?

[If hibernation is ON then the file will be there because it contains all the information needed to hibernate the computer. If you want the file gone then turn hibernation OFF. You can’t have it both ways. –DaBoss]