[lug] LVM on RAID on Ubuntu

Zan Lynx zlynx at acm.org
Mon Mar 10 14:18:17 MDT 2008


Swap isn't that bad...

In your case, I would create a swap partition on each disk and assign
them both as swap with the same priority level.  That gives you
basically RAID-0 swap.

I found that using more swap radically improved performance on my 1GB
laptop.  I had been running with VM swappiness set to 20.  I set it to
100 a couple months ago, and it is MUCH better.  Once things are warmed
up and running, I find it has about 700 MB in swap, with about 300 of
that as SwapCached.  SwapCached means that memory page can be instantly
reclaimed for a new memory allocation, because it's already in swap.

I believe a big part of the advantage is memory fragmentation.  I see
many programs with 10-20 MB in anonymous pages, but their RSS while
running is only 3-5 MB.  They aren't really using the other 15 MB.

I've been putting 256 MB swap files on my USB flash devices.  I plug in
3 of them, prioritized by their speed with the hard disk last.  Swap-in
is *very* fast.  Swap-out rather less so.

The advantage of swap in my case isn't that it lets a single program use
more than 1 GB, but that it frees up unused or rarely used RAM for other
uses.

On Mon, 2008-03-10 at 12:54 -0600, Sean Reifschneider wrote: 
> durist at frii.com wrote:
>  > 1) Can I put /boot and swap on LVM?
> 
> Put boot on it's own RAID-1 set, and then everything else on LVM.
> 
>  > 2) For swap, is there a significant performance penalty?
> 
> Once you're using swap, you're already in a one thousand fold performance
> loss, so do you really care?
> 
>  > 3) Can I use grub, or do I have to use lilo? Is there any special
>  > configuration I need to do?
> 
> The installer should take care of it.
> 
>  > 4) Any special installation caveats or quirks of the Ubuntu installer I need
>  > to know about?
> 
> I don't recall.
> 
> Realize that LVM for everything but boot is pretty common these days,
> Fedora has used that as it's default partition layout for quite a long
> time.  I'm running swap+root on LVM on my laptop and it works fine.  Have
> been for years.
> 
> Sean
-- 
Zan Lynx <zlynx at acm.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20080310/3856e4eb/attachment.pgp>


More information about the LUG mailing list