Where do I even start if hibernate / un-hibernate is slow?

I've been using Ubuntu for about 8 months now, and the time it takes to un-hibernate seems to vary by minutes sometimes. I haven't been able to see a correlation between what's open when it's hibernated and how long it takes. I'm wondering how to go about diagnosing this?

I spun off the question about timing the wakeup to a separate question.


Solution 1:

The official hibernate troubleshooting page is Debugging Kernel Hibernate

However, this forums article looks like it might be more useful (start at comment #4).

Solution 2:

I think the time taken to (un)hibernate will depend mainly on the RAM and swap usage. When you hibernate, the data in RAM is basically saved into swap and when you unhibernate it is loaded from disk. This will be slower when there is more RAM to move. When some swap is used it will most likely take even longer.

It may help with speed if you close the programs which you don't need to sustain their current state before hibernating. I always shut down completely if possible.

I don't think there is an internal way to time (un)hibernation.

http://en.wikipedia.org/wiki/Hibernation_(computing)