[Techtalk] Swap away

Akkana Peck akkana at shallowsky.com
Sun Jun 15 00:33:15 UTC 2008

Conor Daly writes:
> you have 4Gb physical, you probably won't need swap at all.  OTOH, if you
> have a laptop and you want to be able to hibernate, you need at least
> 1xphysical.

There's something I've never understood about swsusp. Suppose I
have 256M physical and another 256M swap, and I'm using most of
both. Now I try to hibernate. The hibernate code needs to write the
contents of RAM 256M), plus the contents of swap (another 265M),
a total of 512M, into a swap partition that's only 256M. How is that
possible? Does swsusp use some kind of super compression so that
it can fit 2*N into a 1*N space?

I remember in the early days of swsusp I tried creating two swap
partitions, using one for swap and the other for hibernate -- and
swsusp wouldn't let me do that, and would only use a partition that
was currently being used as swap.


More information about the Techtalk mailing list