LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-25-2010, 01:43 AM   #1
agostonbejo
LQ Newbie
 
Registered: Oct 2006
Location: Hungary
Distribution: OpenSUSE 11.3
Posts: 11

Rep: Reputation: 0
Question SuSE suspend (s2disk) - 8G swap not enough?


Hi!

I'm trying to get my Dell desktop machine with a SuSE to suspend to disk. This is usually successful once, but after that it's not anymore. First the problem seemed to be that I was low on swap space. (2G swap space, 4G memory in the machine.)

Now I've added 2 swap files, so I have 8G swap in all:
original swap partition 2G
swap file 1 2G
swap file 2 2G

The swap files serve as swap indeed:

# free -m total used free shared buffers cached
Mem: 4048 3796 251 0 41 1985
-/+ buffers/cache: 1770 2278
Swap: 8199 0 8199

However, when I call s2disk, in /var/log/pm-suspend.log I see:

[...]
+ /usr/sbin/s2disk --config /var/lib/s2disk.conf
s2disk: Snapshotting system
s2disk: Not enough free swap
s2disk: retrying, image_size=0
s2disk: Snapshotting system
s2disk: alloc_swap_page failed
s2disk: write_image -> ENOSPC
+ RET=28
+ set +x
[...]


How much more swap does the system need? Or does it have to be one contiguous partition and cannot be split up like I did?


Thanks,
Agoston
 
Old 04-25-2010, 03:07 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,254

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
I've never seen a split partition in suspending - doesn't mean it can't be done

The usual gotchas are: have you the parameter resume=/dev/sda2 or wherever
The swap partition is hardcoded into the kernel. Have you got the correct value there?
 
Old 04-25-2010, 02:19 PM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by agostonbejo View Post
Now I've added 2 swap files, so I have 8G swap in all:
original swap partition 2G
swap file 1 2G
swap file 2 2G
Errm, am I missing something, or is that more like 6G of swap?

Quote:
Originally Posted by agostonbejo View Post
Hi!
How much more swap does the system need? Or does it have to be one contiguous partition and cannot be split up like I did?
Normally, you'd have thought 6G was going to be adequate, and, even 2G has a good chance of being adequate, for normal applications.

You have to find space for all of the application data that you have in ram, plus all of that data that you have in use in swap. I'm not sure in enough detail, but you shouldn't, in principle, need to find space for the 'buffers' or 'cached'. This data may or may not get compressed before getting stored, depending on distro and version.

That suggests that you are starting with something approaching 4G of data, and s2ram is not working. It does suggest that all of your swap space is somehow not not available for suspend. I can only guess whether it would fail with multiple swap partitions or whether it is something to do with swap files that is the problem, but the suggestion seems strong that it is one of those two that is causing the full amount of space not to be usable in this case.
 
Old 04-25-2010, 06:44 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
@salasi have a look at the "free -m" output.
Do you have a /etc/suspend.conf ?. What does it say ?.
 
Old 04-26-2010, 04:01 AM   #5
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by syg00 View Post
@salasi have a look at the "free -m" output.
I did. I was trying to give the OP things to think about for himself, rather than an answer.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
resume problem with s2disk: swap gone rdozijn_2 Debian 0 02-02-2009 06:55 AM
Hibernate (suspend to disk) breaks swap alienDog Linux - General 4 07-21-2008 09:25 AM
Hibernate/suspend with two swap partitions ordealbyfire83 Linux - Hardware 8 07-30-2007 12:11 PM
Hibernate/Suspend issues on opensuse10.2 with swap on LVM tea of evil SUSE / openSUSE 3 03-26-2007 11:14 AM
swap + software suspend astrowill Linux - Software 1 03-27-2005 05:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration