The title and the content don't match very well.

Story: Suspend to disk - does it still make sense?Total Replies: 9
Author Content
theboomboomcars

Jun 24, 2009
7:22 PM EDT
From the title I was expecting to read about the great advances that suspend to ram has taken and boot times speeding up or something along those lines. But this article seemed to be more about the need for swap space.

I have some questions though. How much hard drive space do you have? On my desktop I have 1GB of ram and 500GB of hard drive, so giving up 1-2GB is less than 1% of my available space, so I don't even think about the "lost" space. I haven't upgraded my machine in years, though with ram as cheap as it is it is temping. But hard drives are cheap as well, so it seems that it wouldn't be inconceivable for someone with 8GB of ram to have 1+TB of hard drive space, and you would still be giving up less than1% of you hard drive space for swap so what's the big deal? Especially if you want to use suspend to disk.
jdixon

Jun 24, 2009
7:48 PM EDT
> On my desktop...

You don't really need or want suspend to disk on a desktop. You want it on laptops, where both memory and disk space tend to be more limited.
azerthoth

Jun 24, 2009
8:41 PM EDT
My rule, and the one I teach when doing support. Unless you intend to suspend to disk, swap needs to be double memory until you reach 1 gig swap space, at that point you draw the line. With this is mind thats only because I have the habit of keeping swap around. With 2 gig memory I seldom drop into swap space, and then usually less than 100 meg, and I know how to abuse a system.

If you intend to suspend to disk, then swap = system memory plus a smidge, along the lines of +10% sys memory just to be safe.
tuxchick

Jun 25, 2009
12:29 AM EDT
Won't 'instant-on', or at least very short boot times, make all of this hibernate/suspend stuff unnecessary?
caitlyn

Jun 25, 2009
1:53 AM EDT
tc: That's a matter open to debate. I happen to agree with you. Others would like to preserve some state that exists if they are in the middle of their work.
r_a_trip

Jun 25, 2009
4:41 AM EDT
Maybe my limited end-user mind is missing something, but wouldn't it be an idea to add the ability to suspend to create a suspend-file on a regular partition if the swap partition is non-existent or too small?

It would be problem solved. Even if the "admin" of the system never took suspend to disk into account when he set up the system, the system would be able to suspend anyway.

There might be something special about swap partitions that can't be delivered by files in a regular partition. So if I'm lost in the woods, feel free to educate me.
jdixon

Jun 25, 2009
6:49 AM EDT
> There might be something special about swap partitions that can't be delivered by files in a regular partition.

You can use a file as swap, or at least you could when I first started using Linux. I believe it has to be contiguous, but otherwise it's a normal file. Performance suffers, but for suspend to disk, I doubt enough to matter.
r_a_trip

Jun 25, 2009
8:23 AM EDT
Ah, that's the rub. A file is trickier because of potential fragmentation. Well, no easy way around the swap partition then.

Thanks for the info!
theboomboomcars

Jun 25, 2009
10:32 AM EDT
I use hibernate on my desktop, so I can go back to where I was when it was time to stop using it. Though boot time, and wake up time are basically the same on that system. I use suspend to ram on the laptop because suspend to disk causes a kernel panic.
krisum

Jun 25, 2009
11:47 AM EDT
From what I know, hiberation requires a swap partition and cannot use a swap file. That is not the case with swsusp2, though, but that is not shipped with most distros.

Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]

Becoming a member of LXer is easy and free. Join Us!