8GB of ram but Hibernate file is only 6GB...is that a problem?

Idontcare

Elite Member
Oct 10, 1999
21,110
59
91
Recently migrated from XP to Win7 (fresh install, not upgrade) and I use hibernate so my APC/UPS can do its thing during power-loss.

Rig has 8GB of ram, Win7 sees it all (task manager and control panel) and hibernate is active and does function...I can hibernate at will and resume from hibernate without issues.

Only the quirky, imo, thing is that the hibernate file itself is only 6GB on my hard drive. I have only ever seen the hibernate file be the same size as the recognized ram size so I find this a bit perplexing.

Is this typical in Win7? Did they implement some manner of ram-contents compression such that the file size now only need be the actual size of the contents held in ram at the time of hibernate?
 

JackMDS

Elite Member
Super Moderator
Oct 25, 1999
29,530
416
126
If it comes OK from Hibernation it is Not a trouble.


:cool:
 

Idontcare

Elite Member
Oct 10, 1999
21,110
59
91
I've googled around a bit and while I can't find any official MS documentation confirming that hiberfil.sys != ram size I did come across the elevated command line that allows you to specify a hibernate filesize value as a percentage of your ram:

Powercfg –h –size percentsize

where percentsize is a number between 50 and 100 (set limits by MS)

So my hibernate filesize is now 4GB, learn something new everyday.
 

XZeroII

Lifer
Jun 30, 2001
12,572
0
0
It probably compresses it. This means that it will take longer to enter and resume from hiber. mode.
 

Paperlantern

Platinum Member
Apr 26, 2003
2,239
6
81
It probably compresses it. This means that it will take longer to enter and resume from hiber. mode.

This is my guess too and with the obnoxious amount of storage space most even semi new machines have these days, i dont see the point in sacrificing time (even if its only 10 seconds) just to save 2GB of hard drive space.
 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
It doesn't compress it. The hiberfile is 75% of the total RAM by default in Windows 7.
 

RebateMonger

Elite Member
Dec 24, 2005
11,586
0
0
MS has a paper on this, here:

http://www.microsoft.com/whdc/system/pnppwr/powermgmt/HiberFootprint.mspx

"Windows 7 sets the default size of the hibernation file to 75 percent of total physical memory. We chose this default by evaluating common workloads and their memory use during the development of Windows 7. Windows compresses the contents of memory during the hibernate process to minimize the possibility that the contents exceeds the default size of the hibernation file.

Reducing the hibernation file size from 100 percent of total physical memory helps reduce the disk footprint that is associated with hibernate and frees disk space for user programs and data. This reduction is very important on systems that have limited disk capacity.

However, some rare workloads have a memory footprint that is larger than 75 percent of the total physical memory on the system, even when they are compressed. A system administrator can adjust the size of the hibernation file to as high as 100 percent of total physical memory to account for these conditions."
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It probably compresses it. This means that it will take longer to enter and resume from hiber. mode.

Actually it will most likely result in faster resume and probably suspend as well. Back when I used a Linux notebook daily I always included the Suspend2 (now TuxOnIce) patch to the kernel so that I could use LZF compression on my hibernation image.

The only reason I could see it not being faster is if you're resuming from an SSD. But even then I'd hazard a guess that your CPU is plenty fast enough to keep up and the difference would be minimal.
 

Idontcare

Elite Member
Oct 10, 1999
21,110
59
91
This is my guess too and with the obnoxious amount of storage space most even semi new machines have these days, i dont see the point in sacrificing time (even if its only 10 seconds) just to save 2GB of hard drive space.

It's not about saving space (although SSD users do find it helpful); rather, it is about saving time.

Hibernate with 8GB vs 4GB...your typical drive has a write speed of about 100MB/s...that 8GB hibernate file takes 80seconds to write versus 40seconds if you compress it to 4GB and I doubt the cpu usage for compression is going too eat to much of the 40 seconds of savings (consider that the data itself is already in ram).
 

Idontcare

Elite Member
Oct 10, 1999
21,110
59
91
MS has a paper on this, here:

Thanks for the link! So that explains the 8GB -> 6GB observation. I swear I googled and googled to find an explanation...but I clearly was not using the right keywords/vernacular in my searches as this MS pub did not surface for me. Case solved!
 

RebateMonger

Elite Member
Dec 24, 2005
11,586
0
0
Interesting, I guess it does compress it :)
Hehe. That's why I refuse to ever make a DEFINITIVE statement on these Forums. I maintain a path to weasel-word my way out of anything I say. :)

I swear I googled and googled to find an explanation...but I clearly was not using the right keywords/vernacular in my searches as this MS pub did not surface for me. Case solved!
Yeah, I lucked out on the search terms. I think it was my first search result. Maybe some day there'll be a TV game show where people do Google Searches for cash or memory chips.
 
Last edited:

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Hehe. That's why I refuse to ever make a DEFINITIVE statement on these Forums. I maintain a path to weasel-word my way out of anything I say. :)

Especially with MS' products, it practically impossible to find definitive answers about how most of their stuff works.