Questions re swap and hibernate interaction on 8 gig machine
Lennart Sorensen
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Fri Jun 25 19:54:08 UTC 2010
On Fri, Jun 25, 2010 at 10:18:34AM -0400, Robert Brockway wrote:
> I notice a number of people have mentioned running with no swap. While
> that is certainly possible I still argue in favour of having some swap,
> even if swappiness is set to 0.
>
> My arguments are set out here:
>
> http://www.practicalsysadmin.com/wiki/index.php/Swap
>
> IIRC the system wouldn't swap unless it had _at least_ 2x ram which meant
> most systems stopped swapping entirely :) That bug was fixed *fast*.
>
> I'm not a fan of using tmpfs for /tmp. I think it is a solution looking
> for a problem. Essentially I argue that most apps write so little to
> /tmp that the use of a special case isn't warranted.
>
> Other uses of tmpfs may make a lot of sense though.
>
> The other main reason for swap is the one the OP asked about -
> hibernation. A swap partition is needed - you can't swap to a swap file
> under Linux[1]. In principal you'd need as much swap as ram to guarantee
> a successful hibernation but it could work with less. If there aren't
> sufficient resources the hibernation should fail gracefully. Personally
> I use sleep a lot and rarely hibernate.
>
> [1] Last time I checked. Theoretically it is possible. I'd love to hear
> this had been fixed but I haven't seen any reports.
Linux has supported swapfiles for years. They work fine. Now I don't
think hibernation works with that, although I am not sure.
Swap itself works great on swapfiles and doesn't even have any significant
performance difference compared to a swap partition, assuming you don't
make a sparse file when creating the swap file (so don't do that).
--
Len Sorensen
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list