Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hibernate isn't great if you have lots of RAM. Windows won't allow you put the hiberfil.sys anywhere other than C:\. I was confused as to why my C: SSD appeared full until I figured it was because of hibernation (I have 128GB RAM).


It's a shame hyberfil.sys can't be moved, but as I understand it, the reason behind it is that the kernel only has an extremely rudimentary NTFS driver at the point it resumes so I don't think it'll change soon.

That said, with modern SSD prices I think the size it takes up is quite reasonable these days. For a while, when people were running 64GiB SSDs, the situation was a lot worse.


It's always amuses me when the systems are unbalanced.

'Gaming PC' with a latest i7 but a $200 video card.

'DB Server' with gigantic core count each at 2.0GHz (for less than 30 people of course). Of HDDs as a primary storage.

Laptop with 128Gb of RAM yet insufficient storage to hold 128Gb hiberfil.sys.


Ha! I have several 2TB SSDs that I use for daily work stuff, the boot SSD is 235GB.


People also use hibernation on desktops, servers and VMs (traditionally when normal suspend has problems, but maybe nowadays when s2idle has insomnia problems).


If you managed to get 128Gb of RAM in your desktop then you can manage to get a 1Tb SSD.

Hibernation on a server? Pointless most of the time, because the bulk of the startup time is pre-OS. And hibernating VMs is just retarded.


Depends on the vintage. Up to about 2015 a 128 GB workstation config typically had a <= 512 GB boot SSD and some spinning disk as well.

In servers it's actually quite nice in homelab style setups where you might want to preserve your working session states, or just doing it on a nightly schedule without worrying about losing work.

For VMs it's of course useful to persist vm state to disk and suspend for lots of reasons (don't keep the RAM reseved, or free up VFIO passhthrough hardware for instance). But people often use hypervisor based snapshot for this. One advantage guest OS supported hibernation has it that your guest is aware of its own power state changes and can run your configured power management event hooks on suspend and wake. In the VFIO reddit it seems to be common for people who do windows vm gaming with gpu passthrough to prefer guest hibernate to hyprevisor side snapshots as well, not sure what are the main advantage there.


> Depends on the vintage. Up to about 2015 a 128 GB workstation config typically had a <= 512 GB boot SSD

2015 was a long time ago in terms of SSD technology, but even then the space needed to hibernate 128GB was only $50.

If it's 'typical' to make a workstation that can't spare that space then that's even funnier than if it wasn't typical.


> In servers it's actually quite nice in homelab style setups where you might want to preserve your working session states, or just doing it on a nightly schedule without worrying about losing work.

At this point it's a server in the name only. Even Supermicro takes ages to boot up, HPE and DELL can take up to 5-10 minutes to boot depending on the config.

Sure, there are some situations where it can be used for server, but hibernate is a middle ground between a full boot and STR and loses on the most important metric - the actual boot time.

> For VMs it's of course useful to persist vm state to disk and suspend for lots of reasons

But again it's quite niche. You trade the RAM for the disk space and if you are short on RAM then something gone wrong with planning the resources in the first place. Sure, in some situations (homelab again, *sigh*) it can be useful, but again it's not the popular option. With VDI you still get the bootstorm and lose the caching of the golden image.

> Depends on the vintage. Up to about 2015 a 128 GB workstation config typically had a <= 512 GB boot SSD and some spinning disk as well.

And again this is not 2015 anymore and surely you can have a $50 M.2 (or even SATA) 1Tb QLC SSD for the system drive (and your fancy whatever Tbs SSD for the actual workload).

> not sure what are the main advantage there.

The main difference is what the hardware is initialized again (instead of relying on the hypervisor to restore everything) so I bet it's some GPU shenanigas.

I would like to clarify: sure, in some cases hibernating works^W is useful, but my initial point was about 'unbalanced' configurations and having 128Gb RAM with a boot drive < 512Gb AND requiring hibernate is what would constitute as unbalanced for me.

PS for the sake of it, checked my notebook:

    TM420 C:\Users\amc>dir c:\hiberfil.sys /ahs
     Volume in drive C is Windows
     Volume Serial Number is DEAD-BEEF

     Directory of c:\

    07.05.2023  03:03     4,901,584,896 hiberfil.sys
                   1 File(s)  4,901,584,896 bytes
                   0 Dir(s)  62,332,203,008 bytes free
Even if it was a full file for 12Gbs of RAM (damn those soldered modules) I would be fine with my 256Gb SSD.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: