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
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@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/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
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@tdnet France EURL itsystems@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@jabber.ccc.de ICQ #328449886 Linux-User #280138 with the Linux Counter, http://counter.li.org/
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@tdnet France EURL itsystems@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@jabber.ccc.de ICQ #328449886
Linux-User #280138 with the Linux Counter, http://counter.li.org/
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/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@tdnet France EURL itsystems@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@jabber.ccc.de ICQ #328449886 Linux-User #280138 with the Linux Counter, http://counter.li.org/
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
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
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@tdnet France EURL itsystems@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@jabber.ccc.de ICQ #328449886
Linux-User #280138 with the Linux Counter, http://counter.li.org/
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/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
participants (5)
-
Jacky Lam -
Mandeep Sandhu -
Michelle Konzack -
Mulyadi Santosa -
Ozan Türkyılmaz