Disabling Windows Pagefile & Hibernation to Reclaim SSD Space

Discussion in 'Reviews and Articles (Archived)' started by Rob Williams, Jun 16, 2011.

  1. Rob Williams

    Rob Williams Editor-in-Chief Staff Member Moderator

    12,080
    1
    Jan 12, 2005
    Atlantic Canada
    With the storage space offered on traditional HDDs, SSDs can leave a bit to be desired. Making matters worse are the Windows hibernation mode and pagefile, responsible for hogging at least 8GB (22GB in my case) of your precious SSD space. We're taking a look at the caveats of disabling both, and discuss the fixes.

    You can read our quick how-to on reclaiming storage space hogged by hibernation and the pagefile, then discuss it here!
     
  2. Kougar

    Kougar Techgage Staff Staff Member

    2,588
    0
    Mar 6, 2008
    Texas
    I'd like to urge some caution when considering removing the pagefile from Windows. It may seem useless for systems with 6GB+ of RAM, but Windows uses it for some miscellaneous functions, one of which is sleep mode. If the pagefile is removed completely then users typically can't get sleep mode to function properly, in addition to the inability to store crash and error dump files from RAM.

    For users with 12GB of RAM I don't see a problem with dropping the pagefile size to say, 4GB, but I'd still recommend leaving the file there. I don't believe moving it to a hard drive would affect using sleep mode, but I actually never used sleep mode to say for sure.
     
  3. Unregistered

    Unregistered Guest

    Moved the pagefile to a mechanical drive and never use hibernation so disabled it - freed up 12G on my 60G Vertex 2.

    Cheers for that!
     
  4. Optix

    Optix Basket Chassis Staff Member

    1,514
    0
    Dec 15, 2009
    New Brunswick, Canada
    I had my pagefile turned off completely but thanks to Rob asking a few questions before posting this article, I clued in that this is likely the reason for the low memory warnings when I play games. Duh!

    As for the hibernate file, I don't have one showing. I wonder if this has anything to do with the fact that I set my system to never sleep in the power options? I haven't really done any reading on hibernation since my system is either on, on with the monitor off or off all together.
     
  5. Rob Williams

    Rob Williams Editor-in-Chief Staff Member Moderator

    12,080
    1
    Jan 12, 2005
    Atlantic Canada
    I did a couple of quick tests on my desktop and notebook, and both with or without a pagefile, sleep worked just fine. However, without the pagefile on my desktop, FRAPS gave me some error when I came back, which I assume is because certain bits of information from the pagefile couldn't be grabbed.

    Still, getting around that problem just means having a page file, but having it scale from 16-4096 MBs as I mentioned in the article. That way sleep mode should still work no problem, and you won't lose any GBs (it could be that the required information only takes 16MB anyway, which is why that's the minimum).

    In the case of 8GB of RAM or more, I'd quicker recommend moving the pagefile to an alternate drive. Chances are it will never be touched, so you really don't want to be wasting even 4GB of your SSD on it.

    Nice! Talk about a simple fix to regain 20% of your SSD space ;-)

    As far as I recall, you're running 4GB of RAM, right? That's why I mentioned it'd be recommended to leave a pagefile in tact if that's the case. It can still be located elsewhere, but again, with such a low amount of RAM, that pagefile is bound to be accessed at some point.

    I have doubts with that to be honest, because sleep and hibernate don't operate the same way. Hibernate doesn't rely on the ACPI bus to go into some low-level power state, while Sleep does. That's the reason why when you Hibernate, you still see the POST and boot-loader, but with Sleep you don't.

    Could you have disabled it back when you first got your SSD and were "optimizing" it?
     
  6. Unregistered

    Unregistered Guest

    There MIGHT be a way to relocate the hibernation file with junctions/symbolic NTFS links.

    You can do it manually, but I prefer to use a utility that gives shell extension to creating these:
    http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

    Incidentally this is how you have steam have games located in different places, especially for SSD drives. You probably have a couple games you'd like to load faster on the SSD but doing the entire steam install is too big for SSD.
     
  7. Optix

    Optix Basket Chassis Staff Member

    1,514
    0
    Dec 15, 2009
    New Brunswick, Canada
    There's a good chance that I did. I'm not sure if you recall how my "optimization" changes resulted in an OS reload and a long string of obscenities so I'm sure there were quite a few things that I tinkered with.
     
  8. Kougar

    Kougar Techgage Staff Staff Member

    2,588
    0
    Mar 6, 2008
    Texas
    I could be wrong, but I seem to recall hibernation being disabled by default in desktop Windows 7 installs.

    I totally agree! This is actually what I've done myself. There is one side-effect though... the WEI score for the storage system will change to 5.9 because it will test the drive the pagefile is moved to... more of a bug than anything, but if users were wondering why their SSD was capped at 5.9 that'd be it.
     
  9. siberx

    siberx Obliviot

    2
    0
    Jun 18, 2011
    Although disabling the pagefile entirely on systems with an abundance of RAM may seem like a good idea initially, in practice (at least on Windows based systems) it's usually more problematic than is worth it. Due to Windows' architecture and software stack *expecting* a pagefile, certain operations will just fail or not work properly without any obvious error messages (a couple examples have already been mentioned here). The better solutions are not to remove it entirely, but to move it to another drive (a hard drive is fine, since it'll only see light use the slow speed is not a problem) or to set it to a scaling size with a low limit. The pagefile doesn't need to be *big*, it just needs to be *there*.

    About the recommendation to disable hibernation, this is a great trick to recover some SSD space; not only are SSDs small and benefit well from the recovered space, they're so fast at bootup that normal startup/shutdown is nearly as fast as hibernate would've been anyways.
    IMPORTANT NOTE THOUGH: Trying to run the powercfg command to disable hibernation on a stock Windows 7 install will give you a permission error - you need to run cmd as administrator and accept the UAC prompt (assuming you have it enabled) and then run "powercfg -h off".
     
  10. Unregistered

    Unregistered Guest

    pagefile

    siberx, would 1GB pagefile be enough for a 8GB RAM system? Or how big would you recommend, if it just needs to be there to store logs and stuff, 10MB?
     
  11. siberx

    siberx Obliviot

    2
    0
    Jun 18, 2011
    A gig or two should work just fine for a system like that, but the best thing to do is just try 1GB and if it doesn't give you any weirdness or crashing in your programs, great! If it does, just bump it up a bit ;)

    I've never experimented with *really* small (<512mb) page files so I don't have much input there, but for the few hundred megs you'd save compared to a gig or so it's probably not worth the trouble.
     
  12. Doomsday

    Doomsday Tech Junkie

    1,477
    0
    Nov 24, 2008
    KHI, PAK
    Nice post man! This will definitely come in handy when i get the 80GB Intel SSD!! :)
     
  13. DarkStarr

    DarkStarr Tech Monkey

    585
    0
    Apr 9, 2010
    I always shrink and move my pagefile, I had left hibernation on but I turned it off since I got my sleep mode working.
     
  14. Kayden

    Kayden Tech Monkey

    689
    0
    Sep 13, 2010
    CA
    I read this when it first came out and totally spaced it when I got my SSD. I scored another 13GB from my SSD, thanks for the reminder Rob!
     
  15. Rob Williams

    Rob Williams Editor-in-Chief Staff Member Moderator

    12,080
    1
    Jan 12, 2005
    Atlantic Canada
    No probalo!
     
  16. pmk

    pmk Guest

    moving or altering pagefile

    Apart from the fact that my English is not that good, I know very little about technical matters on my computer.
    I hope that somebody will be prepared to give me some advice.
    I have 16mb of ram and a ssd vertex 3 drive (120Gb)
    I have set my pagefile to automatic and disabled my hiberfil.sys
    What is best to do with the pagefilee, move it to a regular harddisk (how do I prceed with this?) and how should I adjust it so that I don't get problems.
    Somebody advised me to set it to 2 mb?
    Thanks for any given help, Peter
     
  17. Kayden

    Kayden Tech Monkey

    689
    0
    Sep 13, 2010
    CA
    Peter, the Pagefile.sys is your Virtual Memory cache file and is best left on your SSD and set to automatic, this way windows can change the size as needed. The reason you want to keep this on your SSD is because it offers you the best read and write performance of any other HDD in your system. Pagefile.sys should never be disabled or set to anything less then 4GB, because there are some services that use this over physical memory such as your ram. The hibernate is not as critical and can be disabled, especially if your on a desktop and never hibernate your system, but on a laptop you would want to leave this enabled because it's used frequently.
     

Share This Page