[sf-lug] separate partition for /home

Charles Boatwright cboatwright at taos.com
Mon Mar 28 13:12:23 PDT 2011



Ohhhh, to swap or swap to death, that is the question!

here's my $0.02.

You _can_ follow the RH guidelines on swap for a single user box like a laptop, but you'll likely never use but 15% of that diskspace allocated to swap.  Heck - even ubuntu 10.04 still follows the swap = 2x RAM model.  

Once FF or Tbird or X starts bloating beyond belief, you'll see the slowdown and a quick look at top/free/htop/gkrell will let you know that you either need to restart the leaky apps and/or restart X.  

On a multi-user system I don't advocate large swap at all, as there is little difference between the box swapping into the weeds or having the kernel block because malloc is blocking.*

So..  enough theory:

on a laptop with over 2G of memory - I allocate 512M-1G of swap.  On a multi user box with 32+G of memory.  2G swap max.


To the question about slicing up /home....

disk slicing  -   I try and keep /var /tmp and /home isolated.  On ubuntu don't undersize /var, as an in place upgrade will require ~1.3g of available diskspace.  I usually keep /tmp bigger than a CD (or DVD) depending on the system.  /var ~2g plus my logrotate scheme if needed -- note: On some production boxes, /var is 4g (even if I'm using a loghost), on my laptops /var is only 2g.  I tend to keep /home smaller and encourage myself and other users to put stuff on /opt or /srv or a /project volume.  at my employ we keep everything "important" on NFS - the NFS storage is all under quota and backed up etc.  

I don't run web doc roots from /var/www/html.  I symlink the web apps out to another location, or create a virtual host.  Likewise, I don't keep mysql data on /var/lib/mysql

For production boxes, I typically isolate /opt if there is need to store stuff on local disk.  In that case here's my layout

(primaries)
/ 6g
SWAP
/boot (yeah - I still sometimes use boot) 400m

(extended)
/var 2-4g
/tmp 800m-5g
/home 400m per user
/opt or /srv  the rest minus 5g

I always keep a few gig slice in reserve.  This way is I get stuck I can usb boot and run parted to resize the partition that I need.  I try and leave that space between the 3 primary partitions and the extended partition.

This might seem too old school to many.  Especially those who leverage LVM and similar tools.  I've been burned by LVM (LVM on RHEL4 had a "couple" issues) and as such, if I need flexible volume management I do it via the NetApps.

--charles

* for those who don't believe a linux kernel will recover after being pushed to the weeds and back, I ran a RHEL52 box  (a dell r900 with 128g and 4 quad cores) up to a load of 1700-1800 and held it there for a week, then had the processes self term.  I ran a combination of memory allocation tests  (think malloc accordians) and gcc / emacs / kernel builds.   The box(es) not only recovered, but one of the two which I did this to, has been up for 217 days since trying to wax the kernel (no reboot).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://linuxmafia.com/pipermail/sf-lug/attachments/20110328/c2246795/attachment.html>


More information about the sf-lug mailing list