Swap size on RAM upgrade

Smoot Carl-Mitchell smoot at tic.com
Fri Aug 10 00:09:50 UTC 2012

On Thu, 2012-08-09 at 19:39 -0400, Felix Miata wrote:
> On 2012/08/10 00:14 (GMT+0100) sam tygier composed:
> > Felix Miata wrote:
> >> On 2012/08/09 00:56 (GMT+0200) Amedee Van Gasse composed:
> >>> If you don't use hibernation: swap can be *any* size
> >> That includes no swap partition at all. My most used system has 4G RAM
> >> and 8G of swap partitions. The latter is a total waste, since I keep
> >> both swap partitions unmounted and find no evidence of drawbacks in so
> >> doing.
> > It will effect what happens if for some reason your programs want to use
> > more than 4GB of RAM. This might happen because you have some very large
> > files open, or because some program is misbehaving. In the case where you
> > have no swap the out of memory (OOM) killer will be forced to step in and
> > kill the program that it thinks is causing the problem. when you have
> > enough swap, then this will be used and stuff will run slowly. If you are
> > sure this will never happen, then you might not need swap.
> The way I understand swap, if there is no swap partition, and the kernel
> requires swap, and freespace exists on the / filesystem, it will create and
> use a swap file on the / filesystem.

This functionality appears to be in the swapspace package and does not
appear to be installed by default.  Interesting concept.  It does appear
to have enough knobs to keep a runaway process from consuming your disk.
It would make initial system configuration easier.

Smoot Carl-Mitchell
System/Network Architect
voice: +1 480 922-7313
cell: +1 602 421-9005
smoot at tic.com

More information about the ubuntu-users mailing list