Disabling Windows Pagefile & Hibernation to Reclaim SSD Space

Rob Williams

Editor-in-Chief
Staff member
Moderator
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!
 

Kougar

Techgage Staff
Staff member
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.
 
U

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!
 

Optix

Basket Chassis
Staff member
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.
 

Rob Williams

Editor-in-Chief
Staff member
Moderator
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.

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).

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.

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.

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

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

I clued in that this is likely the reason for the low memory warnings when I play games. Duh!

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.

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.

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?
 
U

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.
 

Optix

Basket Chassis
Staff member
Could you have disabled it back when you first got your SSD and were "optimizing" it?
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.
 

Kougar

Techgage Staff
Staff member
I could be wrong, but I seem to recall hibernation being disabled by default in desktop Windows 7 installs.

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.

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.
 

siberx

Obliviot
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".
 
U

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?
 

siberx

Obliviot
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.
 

DarkStarr

Tech Monkey
I always shrink and move my pagefile, I had left hibernation on but I turned it off since I got my sleep mode working.
 

Kayden

Tech Monkey
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!
 
P

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
 

Kayden

Tech Monkey
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.
 
Top