Re: Fix SWSUSP & !SWAP

John Bradford
2003-04-24T08:33:54Z

> > That may be simple for you, but for lots of users, adding a partition
> > (to a ususally full disk drive) isn't simple. It means backups,
> > shrink a filesystem, shrink a partition, add a partition, and run
> > mkswap on it. Yes, the latter 2 are simple, but the former ones
> > are not.
>
> Yeah. swsusp is pretty much the only reason why you would want to have a
> swap partition at all in a 2.5/2.6 kernel.

A lot of users still follow the 'swap space twice the size of physical
RAM' rule of thumb.

Now that physical RAM sizes have increased by an order of magnitude
since that advice was given, there are a lot of systems with far more
swap than they need, which provides the solution to our problem - if
there is a single swap partition which is twice the size of physical
RAM, just split it in to SWAP and SWSUSP slices, (not separate
partitions, slices in the same way BSD subdivides a partition).

2.4 kernels will see a big swap area, and use all of it as swap, 2.5
kernels will see a smaller swap area, (equal to physical RAM size, and
therefore sufficient in a lot of cases), and a SWSUSP area the same
size as physical RAM.

John.