Windows 7 extremely slow resume from hibernation

0

I'm running a Windows 7 SP1 x64 on a Dell Precision M4600 with i7-2720QM, 8 GB of RAM and 512 GB of Samsung 840 Pro SSD. Boot/shutdown times are quite fast.

However, hibernation and resume were always slow (30+ seconds) due to some misunderstanding between Microsoft and Dell, e.g., switching to low-power mode (1 CPU, reduced clock, etc.) before saving the hibernation file. Everything mentioned here was done with plugged-in power.

A few weeks ago my machine started to misbehave and resume now takes 4+ minutes. (Suspend is still about 30 seconds.) The hardware configuration hasn't changed, and I've run several test to check for hardware problems and to verify SSD read/write speeds.

  • I've already tried to disable and re-enable hibernation so that hiberfil.sys gets deleted and re-created.

  • I've tried to make some boot traces - they only showed most of the resume time was spent reading from the disk.

  • I've run powercfg -energy to check for problems. It listed "errors" like

The current power plan personality is High Performance when the system is plugged in.

just according to my intentions of preferring performance to battery life (plugged in?...).

The only useful piece information was

Platform Power Management Capabilities:PCI Express Active-State Power Management (ASPM) Disabled

PCI Express Active-State Power Management(ASPM) has been disabled due to a known incompatibility with the hardware in this computer.

but I cannot help it and I guess it was always disabled.

So does anyone have ideas to what to do/check?

UPDATE

I made some measurements based on Albin's idea. Hibernation and resume times (in seconds):

  • clean, only Windows, 1.7 GB: 15/15
  • default work apps running, 3 GB: 24/30
  • SQL server service started, 3.2 GB: 24/30
  • Firefox used for some time, 4.2 GB, 38/57
  • working for a day, 6.7 GB, 54/193
  • quitting Firefox, 2.8 GB, 32/29
  • restoring Firefox, 5.8 GB, 49/181

Interesting points:

#1: Hibernation time is directly proportional to the RAM used, as it should be, appr. 9 seconds for each GB.

#2: Resume time is not. It is much longer for a working state.

#3: It looks like if compressing the memory and writing it to the SSD would be faster than reading and decompressing. Which clearly should not be.

I haven't hit the several-minute resume yet (and kind of happy for the moment) but I'll check memory size in that case.

Yogurt

Posted 2018-07-20T13:51:51.663

Reputation: 1

Just a random thought, have you tried restarting the machine with as many drivers and start-up programs disabled as possible? Maybe the problem is not hardware related - but I'm just guessing... – Albin – 2018-07-20T14:38:30.620

Albin, as it is resume from hibernation, start-up programs don't really count. Hibernation saves the current state of the machine, with any number of applications running, regardless of whether they were run at startup, or later. As for the drivers, I'm not sure what to disable without screwing up my system. Profiling displayed no driver hog, only simply reading from the hibernation file. – Yogurt – 2018-07-20T15:53:35.537

I wrote my response in an answer. Let me know if you have any further questions and/or if it helped you. – Albin – 2018-07-20T17:46:38.153

I'm not sure it's a simple as writing/reading (compressing/decompressing). Restarting from Hibernation might need some additional tasks like consistency check (just guessing here!), which, depending on their implementation, might need significantly more time. Did you try to get rid some "clutter" that gets loaded in your memory on the problematic system, as I suggested in the "answer", did it make any difference? Or add clutter, to see if it makes to problem worse? Or were you're measurements an that very system? – Albin – 2018-07-21T22:19:34.923

Yep, I've quit Firefox to check the situation. See results above, from the problematic system. – Yogurt – 2018-07-26T06:14:38.460

Answers

-1

I'm writing this as an answer, because it won't be readable in the comments and won't fit into one comment anyway.

First I want to clarify so we talk about the same thing: It's the "Sleep" modus that usually causes the problems hardware power settings. Sleep mode doesn't shut of the HW completely it just puts it into a power saving state. If there is some incompatibility with for example a certain device like the network card you get the trouble.

Hibernation saves the complete memory (RAM) to the hard disc (HD) which shutdown doesn't but then turns off the computer "completely" just as it would when you shut down. And there is a difference is the restart. When it restarts from hibernation instead of loading a "brand new windows instance" (as it would after shut down) it puts the saved memory (which was saved on HD before) back into the memory.

Ergo for I would first suspect some program or driver or windows system task residing in the memory causing the problem. That's why I suggested to check this first, try to minimize the sources for errors. Secondly I would suspect the hardware involved with the transfer (mainly the memory and the HD). Third I would suspect a problem with the hibernation process itself.

Again, this is just an educated guessing, I don't know how the process is implemented completely and in detail, I only know how it's suppose to work in general but so far this was enough to fix any problems I encountered.

Albin

Posted 2018-07-20T13:51:51.663

Reputation: 3 983

I'm talking about hibernation. I'm a software engineer developing Windows desktop apps so you may expect this level of technical background from me. As I wrote in the question, the hardware was checked several times, including CPU, memory, caches, SSD. There are no performance issues of any kind, except resuming from hibernation. – Yogurt – 2018-07-21T20:57:14.713

1ok, sorry, hope I didn't offend you. I don't want to diminish you're knowledge, you never know to what type of user you are talking to. I'm not sure how the hibernation process works, does it "freeze" all operation the moment you hit the button or does it wait for certain operations to finish? – Albin – 2018-07-21T21:10:42.450

Yeah, not offended. Hibernation kind of freezes processes so that the system can write the memory snapshot to the disk. – Yogurt – 2018-07-21T21:47:07.583