Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jan 1999 11:29:06 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Ray Seals <rayseals@midwestis.com>
Cc:        Freebsd-Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Swap Partition dilemma
Message-ID:  <19990126112906.S36690@freebie.lemis.com>
In-Reply-To: <002b01be48b5$8124b6e0$8301000a@rseals.midwestis.com>; from Ray Seals on Mon, Jan 25, 1999 at 04:53:20PM -0600
References:  <002b01be48b5$8124b6e0$8301000a@rseals.midwestis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, 25 January 1999 at 16:53:20 -0600, Ray Seals wrote:
> This may have been covered before so I'm wearing my thick pants....

Good idea :-)

> As a rule of thumb, I've heard you should make your swap partition twice the
> size of memory in the machine.  Since most of us use the entire hard drive,
> this can cause a problem if we up the memory in a machine.  We can't
> increase the size of the partition unless we add another hard drive.

If you don't change the way you use the machine, you will need less
swap, not more, if you add memory.  But typically adding memory means
that you can use the machine harder.

> I have also heard that you can get really bad performance if you
> make a swap way to big.

That's nonsense.

> My thought was this.  If you have a motherboard that can support 128meg of
> RAM and I only have 64meg.  Could I make a swap big enough to support it
> (128meg) (only if it doesn't adversely effect the machine) or should I just
> leave the needed disk space unused on the drive so I can expand it later?

Don't get too hung up on this ``twice memory'' rule of thumb.  The
only thing you should do is ensure that one of your swap partitions is
at least slightly larger (by about 1 kB) than physical memory, because
otherwise you won't be able to take a dump if you panic.  The real
rule for how to use swap depends on what you're doing with the
machine.  It's quite possible to run FreeBSD machines without swap for
some very limited applications; things like Netscape and WordPerfect
require virtual memory like it's going out of style.

A while back, FreeBSD made a tradeoff between swap partition size and
performance.  As a result, you might find swap usage becoming much
higher than you expect.  I currently have:

$ pstat -s
Device      1048576-blocks     Used    Avail Capacity  Type
/dev/wd0s1b             50       49        0    98%    Interleaved
/dev/sd0b              400      143      256    36%    Interleaved
Total                  449      192      257    43%

Note that these values are in megabytes.

Greg
--
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key

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?19990126112906.S36690>