[ale] Anyone know if this is true?

David Tomaschik david at systemoverlord.com
Wed Oct 12 15:57:31 EDT 2011


On Wed, Oct 12, 2011 at 3:43 PM, Geoffrey Myers
<lists at serioustechnology.com> wrote:
> Damon L. Chesser wrote:
>> On Wed, 2011-10-12 at 15:13 -0400, Geoffrey Myers wrote:
>>> 'Just so you all know, when determining how much space to assign to
>>> swap: Swap isn't just used for paging or virtual memory management; swap
>>> is also used by power management for suspend-to-disk (hibernation). '
>>>
>>> I seriously don't know, so I'm asking.
>>
>> Yes, it is true.  If you have 4GB of RAM, you need at least 4GB in order
>> to hibernate and suspend to disk.
>
> So if you have 16GB memory, you must have 16GB of swap?  Seems a bit
> inefficient.  I would assume you are rarely using 16GB.  Why not just
> write what is being used?

No, you don't need 16GB of swap.  Technically, all you need is space
for the parts of data that are not already disk-backed.  Basically,
it's the resident size of all running applications plus any "dirty"
cache pages and active buffers.  (And all memory pages actively in use
by the kernel.)

There's even more to it than that, but that's close enough unless you
want to talk about kernel development.

Though, does anyone still use suspend to disk?

>> All the contents of RAM are written to swap and that is used to come
>> back up in the "saved" state.  This is also why, if you have encrypted
>> partitions, you need to have encrypted swap as well.
>>
>> What I am confused about are the two names used to suspend:  the mode
>> where you use zero power and everything is written to disk and the mode
>> where you just shutdown the drives, screen, and only use RAM.




-- 
David Tomaschik, RHCE, LPIC-1
System Administrator/Open Source Advocate
OpenPGP: 0x5DEA789B
http://systemoverlord.com
david at systemoverlord.com



More information about the Ale mailing list