Partitions

Oliver Fromme olli at lurza.secnetix.de
Thu Dec 11 03:55:30 PST 2003


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).

>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.)

 > 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.

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.  :-)

 > 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 ...

Regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"C++ is over-complicated nonsense. And Bjorn Shoestrap's book
a danger to public health. I tried reading it once, I was in
recovery for months."
        -- Cliff Sarginson


More information about the freebsd-amd64 mailing list