Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Oct 2003 09:56:18 -0400 (EDT)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        pjn0211@yahoo.com (=?iso-8859-1?q?Supote=20Leelasupphakorn?=)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Problem with adding more swap !
Message-ID:  <200310131356.h9DDuJFW005353@clunix.cl.msu.edu>
In-Reply-To: <20031013092517.84335.qmail@web40606.mail.yahoo.com> from "=?iso-8859-1?q?Supote=20Leelasupphakorn?=" at Oct 13, 2003 10:25:17 AM

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Hi, all
> 
>    The documents on freebsd's website suggest that,
> as a system grows, it's recommended for adding more
> swap paritition to system. My questions are: Does
> it mean adding another swap to disk or to slice ?
> 
> 
> The disk structure: 
> 
>         ad0s1 --> ad0s1a   /      (boot from here)
>               --> ad0s1b   swap
>               --> ad0s1e   /var
>               --> ad0s1f   /tmp
>               --> ad0s1g   /usr
> 
>         ad0s2 --> ad0s2e   /usr1  (data)
> 
> Do I need to add another swap partition as "ad0s2b" ?

Hmmm.   I am not quite sure why you would have made two separate
slices on the one disk for FreeBSD instead of having another
partition on slice-1, but...

Anyway, what do you mean 'as a system grows'?   Unless you have some
very memory hungry applications or large numbers of processes that 
hang around but don't really need a lot of processor time, generally 
you figure swap size needs by memory size.   You want at least more
than your physical memory and 2X to 2-1/2X physical memory is the
typical rule of thumb.   If you already meet that, don't worry about,
unless you have some other indication that you are running out of
combined memory/swap (page) space.   NOTE that the virtual memory
system uses swap space for its paging.  Typically, not much actual
swapping really happens, though it can if there are a lot of processes
not doing anything.

You can make a file pretty much anywhere there is room and set things
up to swap to it, but that should be considered only a temporary solution.   
The better thing is to make either a larger s1b or make an s2b partition 
for swap (or add a disk - ad1s1b, + whatever) as you say.

In either case (enlarging s1b or making an s2b), unless you have space
left in one of those slices that you did not already use up in the
existing partitions,  it means redoing the filesystems already on the 
slice.  That means backing up everything on the slice, repartitioning, 
newfsing and restoring everything.  So, given this, it would probably 
be a good time to rethink your whole disk layout and go from there.
Maybe it would also be a good time to go to an additional or larger
disk as well.

////jerry

> 
> TIA,
> pjn



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