Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 May 2000 09:32:50 +1000
From:      Phil Homewood <pdh@bit.net.au>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: BSD Theology: swap, /var, /tmp and /usr/tmp
Message-ID:  <20000503093249.A22805@atlas.bit.net.au>
In-Reply-To: <20000503012329.A3265@student.csd.uu.se>; from ertr1013@student.csd.uu.se on Wed, May 03, 2000 at 01:23:29AM %2B0200
References:  <390F41FD.5880279E@telinco.net> <20000503012329.A3265@student.csd.uu.se>

next in thread | previous in thread | raw e-mail | index | archive | help
Erik Trulsson wrote:
> The idea behind the 2*memory rule is basically that if you need to use more
> memory than twice your physical memory the system will have such lousy
> performance due to all the swapping that you really want more RAM.

My understanding was as follows:

* Suppose you have N Mb of RAM. Assume that N is relatively large
  such that kernel footprint and minimal necessary processes
  occupy negligible fraction of N.

* Suppose you have a process P which needs to use around N Mb of RAM.
  Suppose that all RAM is in use. (ie, worst case for swapping.)

If you have less than 2*N swap, you do not have enough room to swap
out everything else in the N Mb of RAM to swap in (and out) the N Mb
image required by process P in one hit, so you need to do it in
smaller chunks, which thrashes the disk.

If you have > 2*N Mb of swap (plus any required for other swapped
out processes) then you can swap the image of P in and out with
minimal overhead.

Is this correct?


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?20000503093249.A22805>