Partitions

Jimmie Houchin jhouchin at texoma.net
Thu Dec 11 05:46:10 PST 2003


Hello Oliver,

Thanks for the reply.

Oliver Fromme wrote:
> Jimmie Houchin <jhouchin at texoma.net> wrote:
>  > This isn't really a specifically amd64 question but here goes.
> 
> My answer isn't amd64 specific either.  :-)
> 
>  > Do I really need a 4gb swap partition/slice?
>  > I have 4gb ram.
> 
> In that case you should have at least a little more than
> 4 Gbyte swap, because otherwise crashdumps won't work.
> If the kernel panics, an image of the RAM is written to
> the swap partition (by default) for debugging.  That only
> works if the swap partition is at least as big as the RAM
> (actually a little more, because there's some overhead).

This is very informative.

>>From your partition list it seems that you have a 250 Gb
> disk.  In that case I think you can spend a few gigs for
> the swap.  :-)
> 
> Even if you don't expect the machine to swap/page during
> normal use, it's generally not a bad idea to have plenty
> of swap space, so there is sufficient room in case that
> something runs havok.  If your run out of memory (RAM +
> swap), then you're in serious trouble, because the kernel
> starts killing processes randomly.  (Well, actually not
> really randomly, but it has been my experience that it
> tends to kill the "wrong" processes.  YMMV.)

Good information.
I am grateful for the education.

Then I guess the conventional wisdom of the 8gb (2*ram) would be 
appropriate?

>  > This is my current partition structure.
>  > 
>  > /      256mb
>  > /swap  4gb
>  > /usr   8gb
>  > /home  220gb  (the rest)
>  > 
>  > the original label suggestion was:
>  > 
>  > /      256mb
>  > /swap  4gb
>  > /var   256mb
>  > /tmp   256mb
>  > /usr   228gb  (the rest)
> 
> I'd recommend keeping /var seperate.  Having it on the root
> partition is not a good idea.  First, 256 Mbyte is probably
> too small for the root partition plus /var.  Seconds, there
> is usually quite some write activity on /var (log files,
> PID files, spool files, editor backups, compiler temporary
> files etc.), while on the root partition there's usually
> near zero write activity.  Putting them into separate
> partitions will improve performance and robustness.
> That's even more true on a server.

I had originally planned on /var and /tmp being symlinked to the large 
/home partition, /home/var /home/tmp.

That way they both have sufficient room and no impact on root.

Is this a bad idea?

> For /tmp it might be beneficial to put it onto a memory
> file system (disk-backed vnode) instead of a physical
> partition on disk, especially with 4 Gbyte of RAM.
> 
>  > Is 8gb enough for /usr for a server?
> 
> Depends on what kind of server it's going to be.  :-)

Primarily web possibly/probably mail.

At least to my naive thinking I plan on all/most of my data going to my 
/home partition and also to another 250gb mirrored pair when this is 
setup. I really only plan on /usr containing source, libs and apps as 
much as is within reason.

>  > It will have X and dev tools and server apps.
> 
> 8 Gbyte is plenty for X and dev tools.  As far as the
> server apps are concerned, it depends.  Is it a web
> server, a database server, news, proxy, shell server,
> or whatever ...

Thanks,

Jimmie Houchin



More information about the freebsd-amd64 mailing list