Kernel Hibernation

Discuss non-support related topics related to LMDE.
Forum rules
Before you post please read this

Kernel Hibernation

Postby markeight on Wed Oct 12, 2011 12:17 pm

I know this is probably going to be quite a hard question but i have a curiosity...
Does anybody here tried the new Windows8 preview?

I don't use windows since two or three years, but i have to admit that the feature they implemented in the latest build of their new os is really interesting.
As you can see from the title of the thread i'm talking about the new way Windows manage the shutdown.
There is no more a "classic shutdown" the one we have on Mint or other distribution, but there is an Hibernation (so a bunch of things written on the hard disk) that concern only the kernel, leaving out everything that concern the user session.

This is (or almost that's what i think for now) a really intelligent way to manage the boot process, cause this allow you to reach the user login screen in ... something like 10 seconds...

So...i'm just wondering...how hard would it be to implement such a "feature" in a Linux distro like Mint??

ps: i don't know if this is the right section for a discussion like this, maybe a moderator could move it in the right place :)
markeight
Level 1
Level 1
 
Posts: 4
Joined: Wed Oct 12, 2011 12:06 pm

Linux Mint is funded by ads and donations.
 

Re: Kernel Hibernation

Postby xenopeek on Wed Oct 12, 2011 12:55 pm

GNOME 3 Shell is handling shutting down your computer similarly, though it resumes for the same user. It's been around for a while :wink: GNOME 3 will be available on Linux Mint 12 (release November) and probably also Shell can be installed. (It can also be installed on Linux Mint 11, but is lots of work.)

I find it an utterly useless feature. My computer already starts in less than 10 seconds (6.9 on a good day). A good BIOS & motherboard and a fast SSD will make this possible already. And don't discount the OS. Haiku OS starts within a second or three. Windows 8 won't start in 10 seconds from hibernate on a modern computer (8 GiB or more RAM) without also using a SSD. If you already have a SSD, just configure your BIOS properly will net you the same speed.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14660
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Kernel Hibernation

Postby markeight on Wed Oct 12, 2011 2:47 pm

Vincent Vermeulen wrote:GNOME 3 Shell is handling shutting down your computer similarly, though it resumes for the same user. It's been around for a while :wink: GNOME 3 will be available on Linux Mint 12 (release November) and probably also Shell can be installed. (It can also be installed on Linux Mint 11, but is lots of work.)

I find it an utterly useless feature. My computer already starts in less than 10 seconds (6.9 on a good day). A good BIOS & motherboard and a fast SSD will make this possible already. And don't discount the OS. Haiku OS starts within a second or three. Windows 8 won't start in 10 seconds from hibernate on a modern computer (8 GiB or more RAM) without also using a SSD. If you already have a SSD, just configure your BIOS properly will net you the same speed.


The fact that you have such a fast ssd doesn't mean that the feature i was speaking about is useless :mrgreen:
I have a notebook...no bios configuration possible.
The Bios took something like 10 seoconds.
Mint needs other 45-50 seconds to get to the user login screen.
Windows 8 took just other 12 seconds.

the difference on a standard hard disk is huge....

I didn't know about Gnome 3 shell having such a feature...
You say that it resumes also the user session, right?
but...isn't that just the "standard" hibernation i can have also on Mint 11??

Just wondering of course, no criticism :)
markeight
Level 1
Level 1
 
Posts: 4
Joined: Wed Oct 12, 2011 12:06 pm

Re: Kernel Hibernation

Postby xenopeek on Wed Oct 12, 2011 2:57 pm

Yes, you can have that on Linux Mint 11 also. I'm just saying, it is the default behavior for GNOME 3 Shell.

And you might want to catch up on this thread, if you think Windows 8 is in any way good news: http://forums.linuxmint.com/viewtopic.php?f=58&t=81799

As for harddisks, I think SSDs are going to get a boost. China is restricting the export of rare earth metals, a crucial part of harddisks--but not of SSDs. 90% of the world supply of these rare earth metals comes from China. Price of these materials has skyrocketed since this was announced, and harddisk will get to be a lot more expensive in the near future.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14660
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Kernel Hibernation

Postby zerozero on Wed Oct 12, 2011 4:47 pm

i was somehow curious about this windows8 thingy, well, until i found the news Vincent linked above and this absolute file management improvement :mrgreen:
zerozero
Level 16
Level 16
 
Posts: 6471
Joined: Tue Jul 07, 2009 2:29 pm

Re: Kernel Hibernation

Postby markeight on Thu Oct 13, 2011 3:44 am

Guys i don't use windows in the last 3 years.
I also knew about the UEFI, but it is a totally different thing and i don't want to speak about that 'cause my intention is not to label as good/bad an operating system in comparison with another one.
It's a topic regarding this new kind of hibernation :)

Turning back on topic, you say i can alway activate the hibernation on Mint...
That's true, but it is just the standard hibernation, and in my pc this is everything but efficient, cause it takes as long as a standar boot to get to my desktop.

That's the reason why i was curious about the implementation of a "kernel hibernation" in linux...
It seems way more efficient :)
markeight
Level 1
Level 1
 
Posts: 4
Joined: Wed Oct 12, 2011 12:06 pm

Re: Kernel Hibernation

Postby xenopeek on Thu Oct 13, 2011 5:40 am

Right, back on topic. Apologies.

You write that standard hibernation takes a lot of time to get back to your desktop with Linux. Just wondering, but have you actually seen Windows 8 do the hibernate thing on a machine similar to yours? I'm still miffled about this, and am guessing they are using a machine with a SSD.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14660
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Kernel Hibernation

Postby markeight on Thu Oct 13, 2011 8:46 am

Vincent Vermeulen wrote:Right, back on topic. Apologies.

Hey...I don't know if my previous message sounds rude or so, i'm sorry but my English is not perfect so somethimes i'm not so good in explaining what i mean.
I just wanted to make clear that the aim of the topic was different, but i agree with you about what you told about uefi :)

Vincent Vermeulen wrote:You write that standard hibernation takes a lot of time to get back to your desktop with Linux. Just wondering, but have you actually seen Windows 8 do the hibernate thing on a machine similar to yours? I'm still miffled about this, and am guessing they are using a machine with a SSD.


I tried w8 preview on a laptop that i don't use every day, and there's also Mint installed as default OS :)
The "numbers" (regarding boot and hibernation speed) i wrote, are from the tests i took with that laptop.
I can report some tests result about boot processs , but consider that this results do includes the 10seconds that my laptop bios needs (indipendent from the OS):

W7 standard boot: 1m - 1m10s
Mint standard boot: 50s
W7 hibernation: 25s
Mint hibernation: 45-50s
W8 boot (this boot is the one i'm talking about, the one that use by default the "only kernel hibernation"): 20-22s

As you can see...the Mint hibernation is not so efficient...
Is this only a problem of mine??

Considering the big difference between the w7 and Mint hibernation (standard), i was wondering how would (and if it could) the new feature introduced with w8 work on linux.
markeight
Level 1
Level 1
 
Posts: 4
Joined: Wed Oct 12, 2011 12:06 pm

Re: Kernel Hibernation

Postby xenopeek on Thu Oct 13, 2011 11:34 am

:shock: That is quite a difference on the same hardware. (Again, not that I need it on mine :wink:)

A little Googleing gives pointers that the default hibernate can be sped up on Linux. There might be more room for improvement.

For example, tweaking your swap partition size. Who knew, swap can actually be smaller than your RAM and you can still hibernate! Decreasing your swap size will force the kernel to compress or otherwise reduce the amount of swap needed to hold a copy of your run-time RAM. On a slow processor, you won't want this as compressing x GiB memory is too time consuming. On a fast processor, you might actually want this as writing x GiB of memory to disk may in fact be slower... (Source, last paragraph: https://wiki.archlinux.org/index.php/Pm-utils#Hibernation_.28suspend2disk.29)
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14660
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Kernel Hibernation

Postby LSenf on Mon Nov 28, 2011 5:40 pm

Have you tried tuxonice? It's a kernel patch, but there is a ppa (https://launchpad.net/~tuxonice/+archive/ppa)

So far, tuxonice seems to work faster more reliable for me. If you are using multiple drives, tuxonice can even use multiple swap partitions at once without needing configuration.

Another useful tip might be

sync; echo 3 > /proc/sys/vm/drop_caches

This empties all system caches, and so reduces the hibernation image.
LSenf
Level 1
Level 1
 
Posts: 1
Joined: Sun Nov 20, 2011 6:46 pm

Linux Mint is funded by ads and donations.
 

Return to Open Discussion

Who is online

Users browsing this forum: No registered users and 1 guest