Skip site navigation (1)Skip section navigation (2)
Date:      27 Nov 2001 21:17:31 -0800
From:      swear@blarg.net (Gary W. Swearingen)
To:        David Kirchner <davidk@accretivetg.com>
Cc:        Mike Meyer <mwm@mired.org>, Anthony Atkielski <anthony@freebie.atkielski.com>, <questions@FreeBSD.ORG>
Subject:   Re: Calculating swap file size
Message-ID:  <kry9krscd0.9kr@localhost.localdomain>
In-Reply-To: <20011127170344.W15780-100000@localhost>
References:  <20011127170344.W15780-100000@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
David Kirchner <davidk@accretivetg.com> writes:

> On Tue, 27 Nov 2001, Mike Meyer wrote:
> 
> > The VM algorithms aren't quite as efficient if you have less than 2x
> > ram size.
> 
> I've read this in places before (man tuning I believe), but I haven't yet
> found the reason for it. I read through the 4.4BSD book's chapter on
> memory management but I don't recall seeing anything about it. Is there a
> place where this is documented further?

Don't read more out of tuning(7) than was written into it.  It says:

    The kernel's VM paging algorithms are tuned to perform best when
    there is at least 2x swap versus main memory.  Configuring too 
    little swap can lead to inefficiencies in the VM page scanning code

You shouldn't care about the performance of VM algorithms or the
inefficiencies of the VM code.  Maybe the VM designer does, but you
shouldn't, at least for sizing swap partitions.  You should care only
about the performance (ie, speed) of the VM code.  These are different
things.

Man page tuning(7) doesn't imply that a 64 MB RAM system will swap 10 MB
faster with 128 MB swap than with 64 MB swap (and I wouldn't believe it
if it did, without some evidence or explanation.)  Actually I don't
think it even implies that it would be more efficient.

I'm gusssing that it might swap 64 MB of 128 MB swap less than twice as
slowly than 32 MB of 64 MB swap (or some such thing that doesn't
directly impact user swap sizing).  That's the only kind of "algorithm
performance tuning" neccessary to justify the broad statements of
tuning(7).

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?kry9krscd0.9kr>