Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hibernate enabled drastically increases boot time
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
harp
n00b
n00b


Joined: 03 Jul 2012
Posts: 3

PostPosted: Fri May 17, 2013 11:02 am    Post subject: hibernate enabled drastically increases boot time Reply with quote

I just set-up hibernation for my X220.
It works pretty decent but as the title says it slows down the kernel boot time by some seconds if booting without going to hibernation before.
I think the time is consumed by searching for a hibernation image.
But i do not understand why it takes so much time searching for something that does not exist.

If i boot with the noresume kernel parameter the boot is fast again.

Any ideas?
Back to top
View user's profile Send private message
Randy Andy
Veteran
Veteran


Joined: 19 Jun 2007
Posts: 1045
Location: /dev/koelsch

PostPosted: Fri May 17, 2013 2:20 pm    Post subject: Reply with quote

harp

I don't know if this could accelerate you boot process, if the kernel knows exactly which swap device it hast to pick, instead of searching around until he found some empty one and only knows then, there is nothing to resume...

So you could try to declare your swap partition into this second new kernel option (I guess since 3.9.2) and check if it boot as fast as before under the conditions you mentioned.

[*] Hibernation (aka 'suspend to disk') │
() Default resume partition (NEW
Code:

CONFIG_PM_STD_PARTITION:                                              │                            │
 │                            │                                                                       │                            │
 │                            │ The default resume partition is the partition that the suspend-       │                            │
 │                            │ to-disk implementation will look for a suspended disk image.          │                            │
 │                            │                                                                       │                            │
 │                            │ The partition specified here will be different for almost every user. │                            │
 │                            │ It should be a valid swap partition (at least for now) that is turned │                            │
 │                            │ on before suspending.                                                 │                            │
 │                            │                                                                       │                            │
 │                            │ The partition specified can be overridden by specifying:              │                            │
 │                            │                                                                       │                            │
 │                            │       resume=/dev/<other device>                                      │                            │
 │                            │                                                                       │                            │
 │                            │ which will set the resume partition to the device specified.          │                            │
 │                            │                                                                       │                            │
 │                            │ Note there is currently not a way to specify which device to save the │                            │
 │                            │ suspended image to. It will simply pick the first available swap      │                            │
 │                            │ device.                                                               │                            │
 │                            │                                                                       │                            │
 │                            │ Symbol: PM_STD_PARTITION [=]                                          │                            │
 │                            │ Type  : string                                                        │                            │
 │                            │ Prompt: Default resume partition                                      │                            │
 │                            │   Defined at kernel/power/Kconfig:72                                  │                            │
 │                            │   Depends on: HIBERNATION [=y]                                        │                            │
 │                            │   Location:                                                           │                            │
 │                            │     -> Power management and ACPI options


So maybe you would like to try it.

Best, Andy.
_________________
If you want to see a Distro done right, compile it yourself!
Back to top
View user's profile Send private message
harp
n00b
n00b


Joined: 03 Jul 2012
Posts: 3

PostPosted: Fri May 17, 2013 2:31 pm    Post subject: Reply with quote

Hi Andy, thanks for the fast replay.

I already set this to /dev/sda7 (my swap). I think if it is not set this hibernate will not work at all?
Do you have hibernate enabled and see the boot slow down as well?
Back to top
View user's profile Send private message
Randy Andy
Veteran
Veteran


Joined: 19 Jun 2007
Posts: 1045
Location: /dev/koelsch

PostPosted: Fri May 17, 2013 5:54 pm    Post subject: Reply with quote

harp wrote:
Hi Andy, thanks for the fast replay.

I already set this to /dev/sda7 (my swap). I think if it is not set this hibernate will not work at all?


I presume that it also work, if it's not set. Then it will pick the first swap device it could find.

I'm not using hibernate, so I can't answer your second question.

Andy.
_________________
If you want to see a Distro done right, compile it yourself!
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8848

PostPosted: Sat May 18, 2013 12:46 am    Post subject: Reply with quote

What method do you use to hibernate and resume your system?
Back to top
View user's profile Send private message
Randy Andy
Veteran
Veteran


Joined: 19 Jun 2007
Posts: 1045
Location: /dev/koelsch

PostPosted: Sat May 18, 2013 10:18 am    Post subject: Reply with quote

Yes Hu.

Harp, did you consider that: (kernel help text).
Quote:

CONFIG_HIBERNATION: │ │
│ │ │ │
│ │ Enable the suspend to disk (STD) functionality, which is usually │ │
│ │ called "hibernation" in user interfaces. STD checkpoints the │ │
│ │ system and powers it off; and restores that checkpoint on reboot. │ │
│ │ │ │
│ │ You can suspend your machine with 'echo disk > /sys/power/state' │ │
│ │ after placing resume=/dev/swappartition on the kernel command line │ │
│ │ in your bootloader's configuration file. │ │
│ │ │ │
│ │ Alternatively, you can use the additional userland tools available │ │
│ │ from <http://suspend.sf.net>. │ │
│ │ │ │
│ │ In principle it does not require ACPI or APM, although for example │ │
│ │ ACPI will be used for the final steps when it is available. One │ │
│ │ of the reasons to use software suspend is that the firmware hooks │ │
│ │ for suspend states like suspend-to-RAM (STR) often don't work very │ │
│ │ well with Linux. │ │
│ │ │ │
│ │ It creates an image which is saved in your active swap. Upon the next │ │
│ │ boot, pass the 'resume=/dev/swappartition' argument to the kernel to │ │
│ │ have it detect the saved image, restore memory state from it, and │ │
│ │ continue to run as before. If you do not want the previous state to │ │
│ │ be reloaded, then use the 'noresume' kernel command line argument. │ │
│ │ Note, however, that fsck will be run on your filesystems and you will │ │
│ │ need to run mkswap against the swap partition used for the suspend. │ │
│ │ │ │
│ │ It also works with swap files to a limited extent (for details see │ │
│ │ <file:Documentation/power/swsusp-and-swap-files.txt>). │ │
│ │ │ │
│ │ Right now you may boot without resuming and resume later but in the │ │
│ │ meantime you cannot use the swap partition(s)/file(s) involved in │ │
│ │ suspending. Also in this case you must not use the filesystems │ │
│ │ that were mounted before the suspend. In particular, you MUST NOT │ │
│ │ MOUNT any journaled filesystems mounted before the suspend or they │ │
│ │ will get corrupted in a nasty way. │ │
│ │ │ │
│ │ For more information take a look at <file:Documentation/power/swsusp.txt>.


Regards, Andy.
_________________
If you want to see a Distro done right, compile it yourself!
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2190

PostPosted: Sat May 18, 2013 1:23 pm    Post subject: Reply with quote

harp ...

Not much help but I'm using hibernation, tuxonice rather than swsusp, and don't notice any delay when booting. Are you sure that this is swsusp related, or rather what makes you think its specificly hibernation, others have reported delays with the current udev so I wouldn't rule out that something else may be the cause.

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum