I know what you mean. It does indeed seem like the HDD LED flashes for a long time after resuming from hibernation.
Some reasonable explanations have been given about delays due to starting up hardware (and driver acceleration?) and fragmentation (you’ll notice that a system fresh from the factory will generally hibernate and resume fairly quickly while one that has been used for some time will be much slower to do so). There are a couple of more explanations for this behavior.
When you hibernate, Windows flushes the RAM to the drive. Despite high speeds for reading RAM and writing to disk (even with a defragmented hibernation file on a big, empty drive), it still takes quite a while to write several gigabytes (you will notice that hibernating and resuming a system with small amounts of RAM is farily fast). The screen goes off quickly, but the drive (and motherboard, fans, etc.) all remain running for a while until it finishes flushing the RAM to disk. (Make sure not to throw a laptop with an HDD around until after it has finished and completely turned the drive off).
You can do some experimental tests to measure the time it takes from clicking Hibernate until the system is powered down, and the time it takes from the moment you see the Resuming Windows screen until the HDD LED stops flashing. They will likely be approximately equal. (Windows does attempt to make it seem like it resumes from hibernation very fast by writing and then reading the kernel and stuff to the hibernation file first, so that it can get back up and running immediately and then continues to load in the rest in the background and as needed until it has all been resumed—you can see this behavior in action because the login screen is shown very quickly.)
Why then does it seem like resuming takes longer. There’s two explanations for this.
It’s psychological. As Dan pointed out, because the screen turns off right away when you hibernate, it seems like it shuts down fast, while you see the entire resume process (opening screen and HDD LED flashing).
It’s paging. Since most people use hibernate instead of shutdown because they want to avoid exiting programs and such so that they can pick up where they left off, it means that when Windows resumes, there are a bunch of programs already running and already consuming memory. Because a significant amount of time has passed since the last time that Windows’ memory-manager checked on the system, it will likely end up doing a bunch of memory swapping since from its perspective, some programs have been dormant for a while and others have become active. This swapping of course takes a while and thrashes the drive for some time.
The end result is likely a combination of factors and interactions between hardware activation, paging, psychology, and fragmentation.
If you are up to it, you can definitively find out (at least on your system) what is the bottleneck by performing a few simple tests such as using Process Monitor to observe drive/file activity while Windows hibernates and resumes to see whether all that thrashing is due to access to hiberfil.sys
or pagefile.sys
.
1You should try a computer which uses a solid-state drive (SSD), such as a MacBook Pro. It's almost instant, most of the time. – Stewart – 2013-06-10T06:04:12.657
1
capture a hibernation/resume trace with xbootmgr and analyze what is slow: http://www.msfn.org/board/index.php?showtopic=140247
– magicandre1981 – 2013-06-10T18:50:55.803I use hibernate on my work laptop, but to speed it up I close all my apps first (using a small utility called closeall http://www.ntwind.com/software/utilities/close-all.html )
– Morgan T. – 2013-09-27T20:41:33.737