Current category:Tips and Tricks

Disable Hibernate and Erasing hiberfil.sys file corrects slow Windows 7

Windows 7 computers will no longer remain slow if memory is expanded via the disabling of hibernate and the deletion of ‘hiberfil.sys’.

One of the reasons attributed to a slow Windows 7 PC is less amount of memory. And when chain hibernation that’s enabled is followed, with heavy ‘hiberfil.sys’ existing, the computer suffers from less memory.

Incidentally, the term ‘hibernation’ means the state of power conservation basically on laptops. Actually when a system is in sleep mode, user-activity together with settings is placed in memory, so extraction of power is low. But, when hibernation is enabled, applications and open documents are placed on the system’s hard disk followed with disabling of Windows 7. Interestingly, amongst many situations of power saving within Windows 7, hibernation utilizes power in the amount that’s the lowest; however, it uses up over 50% of RAM (Random Access Memory).

Meanwhile, when the Windows 7 is in a hibernation state, the system establishes the “hiberfil.sys” file that’s used when Windows 7 is restarted.

slow pc

In case user does not close Windows 7 rather puts it in hibernation state, he’ll find that it’s nearly immediately possible to access Windows 7. That’s a very big benefit of hibernation i.e. user needn’t wait to have the PC start up first. However, hibernation has many drawbacks too. It saves the whole lot of running software’s information prior to taking up the hibernation state and that leads to an excessively large hiberfil.sys file, which eventually consumes so much of RAM that the Windows 7 computer becomes slow.

The following are the ways in which hibernation along with hiberfil.sys leads to a slow Windows 7:

  1. It eats up energy along with system resources.
  2. It occupies the major part of RAM or disk space that lowers memory and with a large hiberfil.sys file.
  3. It increases the number of disk fragmentations and also very slowly because of the hiberfil.sys stored on the computer’s hard drive

Hence, one of the methods by which Windows 7 performance can be avoided is to first disable “hibernation” feature followed with erasing hiberfil.sys file.

So for turning off hibernation, the steps involved are:

  1. Viewing Power Options where advanced power configurations are to be changed then extending Sleep followed with enabling Hibernate after.
  2. Configuring the Setting (Minutes) for the Never option.
  3. While enabling Allow Hybrid Sleep, configuring ‘Setting’ to ‘Off.’
  4. And finally, pressing ‘ENTER.

Now following deactivation of hibernation mode, the large hiberfil.sys file must be deleted. The steps involved are:

  1. Clicking Start, going to Start Search box and typing in ‘cmd.’
  2. Right-clicking on ‘Command Prompt’ that’s obtained from the search outcomes, and subsequently hitting on ‘Run as Administrator.’
  3. Whilst User Account Control prompts, clicking on Continue.
  4. In Command Prompt field, typing in hibernate off/powercfg.exe followed with clicking OK alternatively, typing in powercfg.exe –h off followed with clicking OK.
  5. Thereafter, typing in ‘exit’ and clicking OK for removing the Command Prompt box.
  6. Finally reboot your Computer.


GD Star Rating
Disable Hibernate and Erasing hiberfil.sys file corrects slow Windows 7, 2.5 out of 5 based on 76 ratings

About Patrick T. Rasmussen

doing Online Marketing for SPAMfighter. Follow me on Google+ (+Patrick Teglstrup Rasmussen), Twitter (Patrick Teglstrup Rasmussen on Twitter)
This entry was posted in Tips and Tricks and tagged , , , , , , , , . Bookmark the permalink.


  1. Leesa says:

    I had no idea this was an option on my laptop. I had heard that Windows 7 was a slower running version of Windows but didn’t know why till now. My laptop seems to especially run slow coming off of hibernation. Do I also need to occasionally defrag too?

  2. Benjamin says:

    Great! Thanks for sharing, this actually works! Though i two times forgot “space” after powercfg.exe –h

    But i finally got it, thanks.

  3. says:

    Just where did u end up getting the suggestions to post ““Deactivating Hibernate
    and Erasing hiberfil.sys corrects Windows 7”?
    Thanks -Myrna

  4. BritannicaWho says:

    I too would have appreciated details or at least one thread of logic to justify the initial assertion.

    This file is stored on the HDD after the de-hibernation process is complete. How would it affect Windows more than your music library size does? (And it doesn’t for all intents.)

  5. Awesome Post. It really works. Thank you Mr. Rasmussen for sharing this wonderful trick.

  6. Dhanaasekar says:

    you find a fixit tool to enable and disable hibernate funciton in windows 7 at this post is very helpful.

  7. Marcy says:

    That Microsoft link is easy and foolproof. I bookmarked it for reference. Thank you!

    I have used their Fix-Its before for other issues, but they don’t generally show up readily in the search results, so I nearly always find them through some other site, but they are great. After decades of lame, half-baked help and support it’s hard to get used to the idea that they finally have legit solutions and then remember to look on their site.

  8. Nicchio says:

    I have a hiberfil.sys on a secondary hard disk (belonging to another computer), I still haven’t found any way to remove it…. 🙁

  9. Vic says:

    You have some misunderstanding on how hibernation works. After it saves contents of RAM to hard disk in hiberfil.sys, then it turns the power completely OFF (power consumption is zero at that point). And this is true for desktop as well as laptop computers. I suggest studying this document since it contains an official explanation of how hibernation works. Hope this helps.

  10. George says:

    Just as Vic said before me. You clearly don’t understand how hibernation works.

  11. AleyCZ says:

    Vic is true. This article is a big nonsense! Hibernation doesn’t eat the RAM, so it also doesn’t slow down the computer. Hibernation just keeps a large file on C: where the contents of RAM are saved in power off state. I can’t believe somebody wrote an article about huibernation when he apparently knows nothing about it.

  12. Mie E. F. Pedersen says:

    A Windows 7 PC can be slow if the hibernate file is so big that the hard disk has a rather limited level of free space. Else you’re right

  13. Ivaylo says:

    But anyway I still have issue after hibernate/sleep mode. The machine is EXTREMLY slow, I cannot do simple things and the only one option for me is restart. I also trid to wait more than a hour but that did not change the things ..

  14. Magistar says:

    I don’t think you have fully comprehended standby states and hyberfile.sys.

    Basically you have two options: suspend to disk and suspend to ram. If you suspend to disk then the contents of the ram will be written to disk (in hyberfile.sys). If you suspend to ram then the ram will still be powered and there is NO need to write to disk.

    Stating that Windows 7 becomes slow because of hybernation uses memory makes absolutely no sense… Ram loses it’s contents when there is no power so either you write it to disk and wait a while for it to load back into the ram OR you suspend to ram and everything stays identical during sleep.

    TLDR: Disabling hyberfile.sys can save you a few GB’s on your hard drives but it will not free memory…

  15. Antonie says:

    I agree with the comments that this article makes no sense. The hyberfile.sys file is just effectively a memory dump so the computer can boot back up to exactly the same state as when it was hibernated (hence the name). I work mobile and find it very handy – the other option is sleep, but this isn’t recommended for laptop’s as sometimes the laptop can unexpected wake up (‘powercfg –device query wake_armed’ can be used to find out why) which can damage it or make your laptop bag very hot 😉

  16. John says:

    Yep . . . obviously does NOT understand Sleep vs. Hibernate. Microsoft has muddied the waters regarding PC power states with names like Sleep and Hibernate for Win7 and newer. In Win95, Win98 and XP there were other names for Sleep, like Suspend, and Stand By. From a hardware and operating system perspective, there are six power states: S0 through S5. S0 is normal operation with the computer doing processing and other tasks. The end user would know this as the computer being “On.” S5 is at the other end of the spectrum and is a total shutdown. The end user would know this as the computer being “Off.” Doing a power off shutdown gracefully from within Windows closes all open applications (offering to the user the option of saving data first if necessary), logging off the user(s) and then powering off all hardware. On most computers, going to S5 from S0 can be forced by holding the power button down for 4 seconds, a method strongly discouraged except as a last resort to recover from an unresponsive operating system or hardware lockup (Windows XP and newer will start up the next time with an error message stating it was not shut down properly). No machine state has been preserved. A “Restart” cycles the computer from S0, to S5 and back to S0 to completely reboot the hardware and operating system from scratch. Sleep mode is S1, S2 or S3 depending on how the hardware platform has been configured for a “Suspend to RAM” partial power down and the difference between them is how much hardware is powered off. Most newer computers use S3, but some older ones used S2 and could be configured for either. Using S1 is quite rare as it shuts off very little hardware and doesn’t save much power. Of all the desktop PCs I’ve built over 30 years, none used S1, but quite a few older motherboards in the past could be set for S2 or S3 for Sleep mode, aka “STR,” or Suspend to RAM. What never gets powered off in S1, S2 or S3 is the RAM, which holds the machine state so that it can continue as if it had not been partially powered down when it’s reawakened. Pull the power plug on a desktop or the external power supply and battery on a laptop, and all will be lost, a very ungraceful forcing from S3 (or S1 or S2) into S5 total shutdown, similar to forcing from a PC from On (S0) to Off (S5) by holding the power button down. S4, or Hibernate, is also called “STD”, or Suspend to Disk, which saves the complete machine state to a hard drive file that can be accessed and used when the hardware is powered back on again, so that it can continue as if it had never been powered down when reawakened. From a hardware standpoint, S4 and S5 are identical with all hardware powered off. The difference is how the operating system saves the current machine state into a hard drive file and recalls it when the hardware is powered on again as the operating system starts to reboot itself. In entering S4 or Hibernate, the operating system saves the machine state, sets a flag for the restart and reboot to recall that machine state from the disk file, then starts the sequence to power off all the hardware. On restart, the operating system sees the hibernation flag set and attempts to read the saved machine state file from the hard drive, to restore the computer to exactly the same state it was in prior to hibernation. On restart from S5 Shutdown, there is no effort to restore a prior machine state, the hardware and O/S are rebooted from scratch, because the hibernation flag was not set.

    As one other already commented, the difference between Sleep and Hibernate . . . each of which is a different form of “Suspend” mode, is “Sleep” suspending the machine’s state within RAM which requires power to hold that state within RAM, and “Hibernate” suspending the machine’s state to a file on the hard drive, after which the machine can be completely shut down requiring zero power. The Hibernate mode is NEEDED for laptops, to keep them from completely losing all power and very ungracefully shutting down with potential data and application corruption or loss. Within Windows XP, Vista and 7, if the laptop is operating from battery power with the batteries nearly exhausted, the operating system will automatically put the laptop into hibernation and turn it off completely (ZERO power consumption), to save the current machine state. Sleep mode continues to consume power and not at a trivially tiny amount. It will exhaust the batteries, and if Hibernate is still enabled, Windows will resort to going from Sleep to Hibernate to prevent machine state and data loss. If the batteries are exhausted completely while still running or in Sleep mode because Hibernation has been disabled, all work will be lost and the next time the computer is powered on there will be a notification that it had been improperly shut down, offering a number of recovery startup options, including Safe Mode, none of which can fully recover data lost because open files were not saved. Disabling Hibernation on a laptop is foolish and NOT recommended as it’s the safety net when running on batteries in the event they’re nearly exhausted. Hibernation on a desktop is a matter of preference, but recognize the risk of using Sleep instead. If there’s a power failure while the desktop is in Sleep mode, it’s the same as a laptop without Hibernate enabled completely exhausting its batteries without its external power supply and battery charger plugged into wall mains. For this reason I rarely use Sleep mode, but prefer Hibernate.

    Hibernate being enabled consumes zero RAM. It’s a process that’s invoked during a hibernation shutdown and only during a hibernation shutdown. It does create a very large file about the size the machine’s RAM (i.e. a 4GB file to store the contents of 4GB RAM on the hard drive . . . and 8GB file to store contents of 8GB RAM, etc.), and that could be a problem if the computer has its hard drive very nearly filled, which is a BAD THING in any operating system, with or without hibernation enabled. In the era of 250GB hard drives being just about the smallest found now, less than 10GB for the hiberfil.sys hibernation file is a drop in the bucket. Furthermore, it doesn’t mysteriously grow in size, never getting any bigger than the amount of RAM the machine has.

    Blaming a “slow” computer on Hibernation (or Sleep) being enabled points the finger in the wrong direction. If the user has loaded it up with many applications and data files open, consuming all available RAM with them, the machine will run slow as it must use swap files on the hard drive in lieu of RAM (as there is no more RAM available). In other words, it’s running slow due to user induced resource overload from all they’ve started running and have open. If it’s then placed into Sleep or Hibernate mode and then reawakened, it’s restored to the same state it was in prior to Sleep or Hibernate, and will return just as bogged down as when it when into Sleep or Hibernate. By contrast, turning the computer off (Shutdown), closes all applications (gracefully or by force), logs off all users, and powers off the computer. On restart after Shutdown (S5), it’s a clean house, or as clean as it can be, with no open applications or data files not set to automatically open from cold startup.

    Rather than disabling Hibernate, especially on a laptop, a user should at least occasionally shut down their computer completely, rather than continuously using Hibernate (or Sleep) as a convenience to access the computer faster. Not all applications are perfect at relinquishing all the resources they’ve consumed when exited (it’s better than it was). Web browsers have been notorious for slowly consuming RAM and not adequately relinquishing it all back to the operating system when browsing windows are closed, doing so only after the browser is completely closed. Javascript and especially Adobe Flash are huge RAM hogs. Likewise there are other applications which slowly consume RAM, even if exited, just so they can start back up faster. Doing a total Shutdown versus Sleep or Hibernate cleans this all out.

  17. Robert C says:

    @ John It is rare to come across a post that is as detailed and easy to understand as the one you did here. For those with no formal computer training who still like to tinker with their computer, as myself, it is very much appreciated.

  18. Julianich Defrancisa says:

    You can use KrojamSoft FilesSearch Tool, it helped me out on many cases. Hope this helped you out!

  19. Julianich Defrancisa says:

    Before you erase the files, use KrojamSoft FilesSearch Tool, it helped me out on many cases. Hope this helped you out!

  20. MicroStar says:

    Great article! That explains why my computer with Windows 7 is so slow! I never turn it off..It’s always on and if I leave I put into hibernate only until I get back..and I usually have lots of programs, apps, and tabs open..bad..I kow.

  21. kamran says:

    hi – I don’t want to disable Hibernation but I want to change the root of hiberfil.sys to other drive. how can I do it?

  22. Astara says:

    @John… I’m not sure about your definitions of S4/S5. Might not S4 be “hybrid sleep” — which you didn’t describe, but is in Win7 (dunnow if it was added in Vista or not). But hybrid sleep is new above ‘XP’. It
    copies everything out to the hiberfil.sys (always located on your system /boot disk), THEN goes into lowest power mode above power-off — where memory refresh is still active, but all other devices are off.

    The deal is it is supposed to be “like” sleep, except that if your system should lose power, it can recover from the hiberfil.sys — so the only thing between hybrid and full hiber, is that memory is still refreshed, but the CPU is in a full halt state.

    On way hiberfil.sys **could** slow your system down is if you only had 1 disk AND didn’t have enough real memory, AND used a dynamically resizing pagefile.

    If you are low on disk space, it takes a bit longer for the OS to find free disk space to store files in — especially if the OS wants a large chunk. So on a smaller system w/only a 250GB drive w/48G memory, the hiber file was taking up about 33G (why not 48? dunno — maybe it uses the page file?). If you add a pagefile some sources *used* (no longer) 2.5 times your memory — which in this systems’s case
    would be over 100GB, but now, the most I hear anyone recommend is a max of same size as system
    memory. Since I didn’t want paging, *at all*, (that really does slow down your system), I used to always run w/o a page file. But I found some OS’s like to page out stuff that’s been unused for a long time as part of “housekeeping”, so like on my linux machine which has 96G RAM, I use an 8G pagefile
    which is still “overkill” — likely 2-4G would be all that’s needed, since right now — and this is on linux,
    only 194M is being used out of the 8G pagefile. I don’t think I’ve ever seen it even use 1G.

    Note — this is after the OS has been up for 94 days — nearly everything is kept in memory because I try to make sure I don’t run programs requiring more memory than I actually have. That’s the killer.
    If you are paging/swapping, because you are running more programs than will fit in your physical
    memory, THEN you get slowdown — which, if your pagefile on your system disk is “OS-controlled” (not fixed size), AND if you have a large hiberfil.sys, AND if your disk is over 75-90% full (depends on disk and other factors), THEN the OS might be slowed down looking for space to increase your pagefile
    size (only if you use OS-controlled and only if the pagefile is on your system disk along with the hiberfil.sys).

    But best practices — 1) be sure to have enough memory to run everything you want to run at the same time. 2) if you use a pagefile (and don’t need full size OS-core dumps, which most people DON’T), then put the pagefile on it’s own separate partition and make it a *fixed* size. If you run more programs than you have physical memory (RAM) for, and need a pagefile — best practices say to put it on a separate disk by itself — and make it a fixed size. These days, ideally, use an SSD — a smallish, but fast one would be best — often no more than 64G or so in size will be more than enough…

    So hiberfil.sys can *rarely* slow down your computer… under specific circumstances. The reason I stumbled onto this thread — I needed to disable hibernation in order to do a system backup (it didn’t have enough free space on the system disk to create a shadow copy). So I needed to remove it entirely,
    which freed up just enough space to allow the backup to happen (the system *really* needs a larger hard disk!)…


  23. John says:

    All five of my PCs are running Win7. The two laptops use the traditional S4 “hibernate” and S3 “sleep” with options to select either, along with complete shutdown when shutting down the laptops. The three desktops are configured for the “hybrid sleep” you mention. It’s an enhanced S3 Suspend to RAM (STR) state with nearly all hardware turned off and RAM maintained. The difference between it and the traditional S3 “sleep” STR is also writing a hiberfil.sys and setting the restart flag to reload RAM and processor states from hiberfil.sys as a backup S4 mode in the event the computer loses power. The computer will go into S3 STR and come back from it provided the PC doesn’t lose power. If it does lose power, when it’s turned back on it will restart as if it had entered S4 STD Hibernate. Desktop PCs losing power has been the problem with traditional S3 STR “Sleep” as it goes to S5 complete power off when power is lost. Restarting after that is from S5 with the potential for lost work in progress and possible problems with files that were open for editing when it entered S3 STR. With laptops running Win7 the Hybrid Sleep should be turned off so that it uses the traditional Sleep and Hibernate modes, and ability to Hibernate should be left on. The reason is laptops not plugged into a charger in sleep mode need to be able to automatically put themselves into S4 STD Hibernate from S3 STR Sleep if the battery power gets too low (I’ve had this happen) versus allowing the battery to completely drain which not only risks losing work in progress, it’s hard on the battery. If you don’t like the hybrid sleep on a Win7 desktop PC then turn it off.

    You are correct that a PC low on hard drive space can slow down if all the processes running are collectively demanding substantial RAM compared to the amount of hardware RAM the PC has and is having to use page files heavily (aka RAM swap files on disk). One can see this with processes bogging down and the drive light illuminating for extended lengths of time. If free disk space is so limited that an 8GB hiberfil.sys needs to be eliminated, IMO a larger disk for more free head room is very appropriate. Windows boxes (and Linux as well) are much happier when there is disk head room. One of the better ways to free up more space than dumping the hiberfil.sys is looking at how much disk space is allowed (by percentage) for the restoration files. I would NOT EVER turn off “System Restore” including saving files in addition to system settings, only reduce the percentage of disk space allowed. Be very cautious about drastically reducing it as it can prevent saving a complete restore point of which I would generally want at least two or three minimum. Needing to go back more than three restore points would be quite rare and could present potential problems with installed applications requiring time consuming application reinstalls or updates even if it restore points also save files in addition to system settings. I’ve used restore points as a last resort to recover PCs that could not be recovered by other other means and consider it an essential feature. However if an enormous amount of space is allowed for this and a dozen restore points have accumulated, reducing that could free more space than turning off Hibernate (and hybrid sleep) mode to delete the hiberfil.sys file would.


  24. At this time it sounds like Expression Engine is the best blogging platform available right now.

    (from what I’ve read) Is that what you are using on your blog?

  25. Juegos30 says:

    Thanks for all information 🙂


Leave a Reply

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