Slow 12.04 on a Netbook with LVMs

Avi Greenbury lists at
Fri Apr 26 10:22:53 UTC 2013

Liam Proven wrote:
> > I'd like to create the swap space as a file, not a partition.
> Possible but saps performance (marginally, in theory; allegedly Linux
> >=2.6 ameliorates this).

As of an early 2.6 they're identical, assuming that the swap file
isn't sparse. The easiest way to do that is to dd /dev/zero into the
file then mkswap it; modern swapons wont let you use a sparse swap

> If you have 1-2GB of RAM, try zRam and no swap at all. Works well for me.

Does that still permit suspend/resume? That's the only reason I have
swap configured anywhere.

> primary, 8GB, for /
> Extended for all the rest
> Inside that, (all the available space - (RAM × 2) as /home, encrypted
> if you feel you need to), and at the end, (2×RAM as swap). That gives
> you plenty of space for hibernation support.

You only need swap that is as big as (1 x used RAM + (2 x used swap) ) for
suspend to work.

Personally, here I'd have a single / partition, use the loopback
method for encrypting /home and have a swap file. All the convenience
of LVM (directories can grow as they please) without actually having
to do anything. If you do suddenly need some extra space for a bit,
you can just delete the swap file and reinstate it when you're done. 


More information about the ubuntu-users mailing list