Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 May 2000 03:39:03 -0700 (PDT)
From:      Derrick Baumer <bduk@earthlink.net>
To:        ertr1013@student.csd.uu.se
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: BSD Theology: swap, /var, /tmp and /usr/tmp
Message-ID:  <200005031039.DAA03895@earthlink.net>
In-Reply-To: <20000503012329.A3265@student.csd.uu.se> (message from Erik Trulsson on Wed, 3 May 2000 01:23:29 %2B0200)

next in thread | previous in thread | raw e-mail | index | archive | help

> From: Erik Trulsson <ertr1013@student.csd.uu.se>
> 
> On Tue, May 02, 2000 at 10:00:45PM +0100, Peter McGarvey wrote:
> > Theological problem this.  Facts and Opinions welcome...
> > 
> > Okay, I /think/ I know what I'm doing when I slice-up a disk for a
> > FreeBSD system...
> > 
> > 	/ -> 64MB
> > 	swap -> 2 * memory (rounded-up to the nearest MB)
> > 	/usr -> the remaining disk

[snipped tons, since we've all been following along and it's pretty
long as is...]

Re: swap size

I'm trying to picture a machine, even one that has 512 MB RAM,
swapping a gigabyte of memory.  Seems to me that the machine in
question would be doing a *lot* more work than one machine should be
asked to do.  The fastest disk in the world would still bring the
system to a crawl, and you'd burn the disk up in no time flat.
  The 2*memory rule is based on the assumption that if you're swapping
more than the memory you have, your performance will be so slow as to
be unacceptable.  It means that if you need more swap space than you
have memory, you need to get more memory, not add more swap space.
  It does *not* mean that if you have X memory you should always have
X*2 swap.
  This person's best bet would be to try to determine how much memory
he is actually using and to set his swap space accordingly,
specifically based on those calculations.  Calculated usage + 50% is
about the most I ever go with.  And if he really *is* using 1.5 GB of
RAM, I would strongly recommend he investigate distributed processing
or dividing the machine's basic tasks among two or more machines
(ie. one mail server, one web server, one local server...).

Re: turning off a swap partition for system performance

I don't think that is the way it works.  If he's using so much swap
that the second partition is active and the system is crawling,
turning off that swap drive is going to crash his system - because
turning it off at that point would be taking away memory that is *in
use by the system*.  I can't see how Linux would work otherwise
either.

Re: root partition

5 MB wont hold a single debug kernel.  Seems outrageously small, but
it may be an acceptable size under Linux.  Here's where you step in
and explain some FreeBSD differences to him.

Re: the rest

It's a lot more work, but determining the actual storage requirements
and configuring the system accordingly, giving up to 50% "slop" as
space permits, would really be the best bet.  That is *if* the machine
is being used for a specific purpose and not for random "let's see
what this does" type installation and such.  In the latter case, the
configuration described seems appropriate, excepting the swap and root
sizes already discussed.

---

Derrick Baumer
(I'm not a system's administrator, but I play one on freebsd-questions)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005031039.DAA03895>