kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Linux hibernation
@ 2011-03-14  8:19 Jacky Lam
  2011-03-14 10:20 ` Mandeep Sandhu
  2011-03-14 17:13 ` Mulyadi Santosa
  0 siblings, 2 replies; 10+ messages in thread
From: Jacky Lam @ 2011-03-14  8:19 UTC (permalink / raw)
  To: kernelnewbies

Hi all,

     I am looking at the source code 2.6.29 and find that Linux will 
make a copy of used memory pages when doing hibernation. I am curious, 
in this case, what Linux do if I have used over 50% of memory? Will 
hibernation just fail? I think it is not possible, but I can't 
understand from the code.

     Could any explain a little bit for me? Thanks.

Jacky

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Linux hibernation
  2011-03-14  8:19 Linux hibernation Jacky Lam
@ 2011-03-14 10:20 ` Mandeep Sandhu
  2011-03-14 11:12   ` Ozan Türkyılmaz
  2011-03-14 11:24   ` Michelle Konzack
  2011-03-14 17:13 ` Mulyadi Santosa
  1 sibling, 2 replies; 10+ messages in thread
From: Mandeep Sandhu @ 2011-03-14 10:20 UTC (permalink / raw)
  To: kernelnewbies

> ? ? I am looking at the source code 2.6.29 and find that Linux will
> make a copy of used memory pages when doing hibernation. I am curious,
> in this case, what Linux do if I have used over 50% of memory? Will
> hibernation just fail? I think it is not possible, but I can't

I have seen hibernation fail on my laptop if I have a lot of
applications open (evolution/empathy). Then if I close these apps and
hibernate again...it works. So yes, I think it can fail if it doesn't
have enough RAM available.

HTH,
-mandeep

> understand from the code.
>
> ? ? Could any explain a little bit for me? Thanks.
>
> Jacky
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Linux hibernation
  2011-03-14 10:20 ` Mandeep Sandhu
@ 2011-03-14 11:12   ` Ozan Türkyılmaz
  2011-03-14 11:24   ` Michelle Konzack
  1 sibling, 0 replies; 10+ messages in thread
From: Ozan Türkyılmaz @ 2011-03-14 11:12 UTC (permalink / raw)
  To: kernelnewbies

2011/3/14 Mandeep Sandhu <mandeepsandhu.chd@gmail.com>:
>> ? ? I am looking at the source code 2.6.29 and find that Linux will
>> make a copy of used memory pages when doing hibernation. I am curious,
>> in this case, what Linux do if I have used over 50% of memory? Will
>> hibernation just fail? I think it is not possible, but I can't
>
> I have seen hibernation fail on my laptop if I have a lot of
> applications open (evolution/empathy). Then if I close these apps and
> hibernate again...it works. So yes, I think it can fail if it doesn't
> have enough RAM available.
>

You mean swap place right. I had similar failures over small swap
space because I had way too much things open on my computer.


-- 
Ozan, BSc, BEng

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Linux hibernation
  2011-03-14 10:20 ` Mandeep Sandhu
  2011-03-14 11:12   ` Ozan Türkyılmaz
@ 2011-03-14 11:24   ` Michelle Konzack
  2011-03-14 12:32     ` Mandeep Sandhu
  1 sibling, 1 reply; 10+ messages in thread
From: Michelle Konzack @ 2011-03-14 11:24 UTC (permalink / raw)
  To: kernelnewbies

Hello Mandeep Sandhu,

Am 2011-03-14 15:50:32, hacktest Du folgendes herunter:
> I have seen hibernation fail on my laptop if I have a lot of
> applications open (evolution/empathy). Then if I close these apps and
> hibernate again...it works. So yes, I think it can fail if it doesn't
> have enough RAM available.

It fail, if you have used the whole RAM,  Linux  already  consuming  the
SWAP and you want to use the SWAP Partition as Hybernation-Storage.

Thanks, Greetings and nice Day/Evening
    Michelle Konzack

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems at tdnet France EURL       itsystems at tdnet UG (limited liability)
Owner Michelle Konzack            Owner Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz                 Kinzigstra?e 17
67100 Strasbourg/France           77694 Kehl/Germany
Tel: +33-6-61925193 mobil         Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

<http://www.itsystems.tamay-dogan.net/>  <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/>         <http://www.can4linux.org/>

Jabber linux4michelle at jabber.ccc.de
ICQ    #328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110314/5df4f719/attachment.bin 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Linux hibernation
  2011-03-14 11:24   ` Michelle Konzack
@ 2011-03-14 12:32     ` Mandeep Sandhu
  2011-03-15  7:50       ` Michelle Konzack
  0 siblings, 1 reply; 10+ messages in thread
From: Mandeep Sandhu @ 2011-03-14 12:32 UTC (permalink / raw)
  To: kernelnewbies

> Am 2011-03-14 15:50:32, hacktest Du folgendes herunter:
>> I have seen hibernation fail on my laptop if I have a lot of
>> applications open (evolution/empathy). Then if I close these apps and
>> hibernate again...it works. So yes, I think it can fail if it doesn't
>> have enough RAM available.
>
> It fail, if you have used the whole RAM, ?Linux ?already ?consuming ?the
> SWAP and you want to use the SWAP Partition as Hybernation-Storage.

Hmmm. I have a pretty big swap partition ~ 4 GB. I'm not sure if that
was completely used when hibernate failed.

Will take a note of 'free' o/p before doing a hibernate and see if
both RAM and swap are full or not.

Right now I'm running a full load and the swap is hardly used.

$ free -m
             total       used       free     shared    buffers     cached
Mem:          2885       2635        249          0        236       1402
-/+ buffers/cache:        997       1887
Swap:         3813        372       3441

I'll see if with this load, hibernate fails or not.

-mandeep

>
> Thanks, Greetings and nice Day/Evening
> ? ?Michelle Konzack
>
> --
> ##################### Debian GNU/Linux Consultant ######################
> ? Development of Intranet and Embedded Systems with Debian GNU/Linux
>
> itsystems at tdnet France EURL ? ? ? itsystems at tdnet UG (limited liability)
> Owner Michelle Konzack ? ? ? ? ? ?Owner Michelle Konzack
>
> Apt. 917 (homeoffice)
> 50, rue de Soultz ? ? ? ? ? ? ? ? Kinzigstra?e 17
> 67100 Strasbourg/France ? ? ? ? ? 77694 Kehl/Germany
> Tel: +33-6-61925193 mobil ? ? ? ? Tel: +49-177-9351947 mobil
> Tel: +33-9-52705884 fix
>
> <http://www.itsystems.tamay-dogan.net/> ?<http://www.flexray4linux.org/>
> <http://www.debian.tamay-dogan.net/> ? ? ? ? <http://www.can4linux.org/>
>
> Jabber linux4michelle at jabber.ccc.de
> ICQ ? ?#328449886
>
> Linux-User #280138 with the Linux Counter, http://counter.li.org/
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Linux hibernation
  2011-03-14  8:19 Linux hibernation Jacky Lam
  2011-03-14 10:20 ` Mandeep Sandhu
@ 2011-03-14 17:13 ` Mulyadi Santosa
  1 sibling, 0 replies; 10+ messages in thread
From: Mulyadi Santosa @ 2011-03-14 17:13 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Mar 14, 2011 at 15:19, Jacky Lam <lamshuyin@gmail.com> wrote:
> Hi all,
>
> ? ? I am looking at the source code 2.6.29 and find that Linux will
> make a copy of used memory pages when doing hibernation. I am curious,
> in this case, what Linux do if I have used over 50% of memory? Will
> hibernation just fail? I think it is not possible, but I can't
> understand from the code.

based on my experience, hibernation fails if swap can't hold the total
size of anonymous pages plus certain kind of pages (such as mlock()-ed
one, slab etc etc).

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Linux hibernation
  2011-03-14 12:32     ` Mandeep Sandhu
@ 2011-03-15  7:50       ` Michelle Konzack
  2011-03-15  7:58         ` Mulyadi Santosa
  2011-03-17 13:53         ` Mandeep Sandhu
  0 siblings, 2 replies; 10+ messages in thread
From: Michelle Konzack @ 2011-03-15  7:50 UTC (permalink / raw)
  To: kernelnewbies

Hello Mandeep Sandhu,

Am 2011-03-14 18:02:56, hacktest Du folgendes herunter:
> Hmmm. I have a pretty big swap partition ~ 4 GB. I'm not sure if that
> was completely used when hibernate failed.

OK your system has 3 GByte of memory with 4 GByte of SWAP.

> Will take a note of 'free' o/p before doing a hibernate and see if
> both RAM and swap are full or not.
> 
> Right now I'm running a full load and the swap is hardly used.
> 
> $ free -m
>              total       used       free     shared    buffers     cached
> Mem:          2885       2635        249          0        236       1402
> -/+ buffers/cache:        997       1887
> Swap:         3813        372       3441
> 
> I'll see if with this load, hibernate fails or not.

You have 2,75 GByte of Memory + 256 MByte of Graphic Ram right?

If your system use the the SWAP partition to  hybernate,  then  it  will
fail, because it has to do a "swapoff" and write  the  contents  of  the
SWAP to memory.

In clear, you are currently using

    4096 MByte RAM + 374 MByte SWAP - 249 MByte Free

    = 4221 MByte = 4,12 GByte

which is to much o fit into memory.

> -mandeep

Thanks, Greetings and nice Day/Evening
    Michelle Konzack

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems at tdnet France EURL       itsystems at tdnet UG (limited liability)
Owner Michelle Konzack            Owner Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz                 Kinzigstra?e 17
67100 Strasbourg/France           77694 Kehl/Germany
Tel: +33-6-61925193 mobil         Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

<http://www.itsystems.tamay-dogan.net/>  <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/>         <http://www.can4linux.org/>

Jabber linux4michelle at jabber.ccc.de
ICQ    #328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110315/c1715a23/attachment.bin 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Linux hibernation
  2011-03-15  7:50       ` Michelle Konzack
@ 2011-03-15  7:58         ` Mulyadi Santosa
  2011-03-15 10:02           ` Jacky Lam
  2011-03-17 13:53         ` Mandeep Sandhu
  1 sibling, 1 reply; 10+ messages in thread
From: Mulyadi Santosa @ 2011-03-15  7:58 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Mar 15, 2011 at 14:50, Michelle Konzack
<linux4michelle@tamay-dogan.net> wrote:
> You have 2,75 GByte of Memory + 256 MByte of Graphic Ram right?
>
> If your system use the the SWAP partition to ?hybernate, ?then ?it ?will
> fail, because it has to do a "swapoff" and write ?the ?contents ?of ?the
> SWAP to memory.
>
> In clear, you are currently using
>
> ? ?4096 MByte RAM + 374 MByte SWAP - 249 MByte Free
>
> ? ?= 4221 MByte = 4,12 GByte
>
> which is to much o fit into memory.

hm, CMIIW, but I think you also count page cache above...that's
discardable...i.e kernel will push them back into backing disc... so,
they're not really counted... only anonymous pages, locked pages and
similar ones which is swaped out...

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Linux hibernation
  2011-03-15  7:58         ` Mulyadi Santosa
@ 2011-03-15 10:02           ` Jacky Lam
  0 siblings, 0 replies; 10+ messages in thread
From: Jacky Lam @ 2011-03-15 10:02 UTC (permalink / raw)
  To: kernelnewbies

On 3/15/2011 3:58 PM, Mulyadi Santosa wrote:
> On Tue, Mar 15, 2011 at 14:50, Michelle Konzack
> <linux4michelle@tamay-dogan.net>  wrote:
>> You have 2,75 GByte of Memory + 256 MByte of Graphic Ram right?
>>
>> If your system use the the SWAP partition to  hybernate,  then  it  will
>> fail, because it has to do a "swapoff" and write  the  contents  of  the
>> SWAP to memory.
>>
>> In clear, you are currently using
>>
>>     4096 MByte RAM + 374 MByte SWAP - 249 MByte Free
>>
>>     = 4221 MByte = 4,12 GByte
>>
>> which is to much o fit into memory.
> hm, CMIIW, but I think you also count page cache above...that's
> discardable...i.e kernel will push them back into backing disc... so,
> they're not really counted... only anonymous pages, locked pages and
> similar ones which is swaped out...
>
     Some pages that are not necessary to be saved are also counted. 
This can be proved by doing :

     echo 3 > /proc/sys/vm/drop_caches

     before you hibernate. You can get smaller image size after that.

Jacky

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Linux hibernation
  2011-03-15  7:50       ` Michelle Konzack
  2011-03-15  7:58         ` Mulyadi Santosa
@ 2011-03-17 13:53         ` Mandeep Sandhu
  1 sibling, 0 replies; 10+ messages in thread
From: Mandeep Sandhu @ 2011-03-17 13:53 UTC (permalink / raw)
  To: kernelnewbies

>> I'll see if with this load, hibernate fails or not.
>
> You have 2,75 GByte of Memory + 256 MByte of Graphic Ram right?

correct.

>
> If your system use the the SWAP partition to ?hybernate, ?then ?it ?will
> fail, because it has to do a "swapoff" and write ?the ?contents ?of ?the
> SWAP to memory.
>
> In clear, you are currently using
>
> ? ?4096 MByte RAM + 374 MByte SWAP - 249 MByte Free

you mean 372MB of swap is used (not 374 MB?).
>
> ? ?= 4221 MByte = 4,12 GByte
>
> which is to much o fit into memory.

How did you arrive at 4096 MB figure? Are you adding the currently
used mem + cached pages?

-mandeep

>
>> -mandeep
>
> Thanks, Greetings and nice Day/Evening
> ? ?Michelle Konzack
>
> --
> ##################### Debian GNU/Linux Consultant ######################
> ? Development of Intranet and Embedded Systems with Debian GNU/Linux
>
> itsystems at tdnet France EURL ? ? ? itsystems at tdnet UG (limited liability)
> Owner Michelle Konzack ? ? ? ? ? ?Owner Michelle Konzack
>
> Apt. 917 (homeoffice)
> 50, rue de Soultz ? ? ? ? ? ? ? ? Kinzigstra?e 17
> 67100 Strasbourg/France ? ? ? ? ? 77694 Kehl/Germany
> Tel: +33-6-61925193 mobil ? ? ? ? Tel: +49-177-9351947 mobil
> Tel: +33-9-52705884 fix
>
> <http://www.itsystems.tamay-dogan.net/> ?<http://www.flexray4linux.org/>
> <http://www.debian.tamay-dogan.net/> ? ? ? ? <http://www.can4linux.org/>
>
> Jabber linux4michelle at jabber.ccc.de
> ICQ ? ?#328449886
>
> Linux-User #280138 with the Linux Counter, http://counter.li.org/
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-17 13:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-14  8:19 Linux hibernation Jacky Lam
2011-03-14 10:20 ` Mandeep Sandhu
2011-03-14 11:12   ` Ozan Türkyılmaz
2011-03-14 11:24   ` Michelle Konzack
2011-03-14 12:32     ` Mandeep Sandhu
2011-03-15  7:50       ` Michelle Konzack
2011-03-15  7:58         ` Mulyadi Santosa
2011-03-15 10:02           ` Jacky Lam
2011-03-17 13:53         ` Mandeep Sandhu
2011-03-14 17:13 ` Mulyadi Santosa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).