Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Apr 2002 19:27:15 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        "Marc G. Fournier" <scrappy@hub.org>
Cc:        freebsd-current@freebsd.org, freebsd-stable@freebsd.org
Subject:   Re: FreeBSD 4.5-STABLE not easily scalable to large servers ... ?
Message-ID:  <3CC4C683.F9AEF14E@mindspring.com>
References:  <20020422104250.E1721-100000@mail1.hub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
"Marc G. Fournier" wrote:
> First, alot of this stuff is slowly sinking in ... after repeatedly
> reading it and waiting for the headache to disapate:)
> 
> But, one thing that I'm still not clear on ...
> 
> If I have 4Gig of RAM in a server, does it make any sense to have swap
> space on that server also?

Yes.  But it (mostly) does not apply to KVA, only to UVA data,
and there are much larger KVA requirements, so the more RAM you
have, the bigger the bottleneck to user space for anything you
swap.


> Again, from what I'm reading, I have a total of 4Gig *aggregate* to
> work with, between RAM and swap, but its right here that I'm confused
> right now ... basically, the closer to 4Gig of RAM you get, the closer
> to 0 of swap you can have?

No.

I think you are getting confused on cardinality.  You get one KVA,
but you get an arbitrary number of UVA's, until you run out of
physical RAM to make new ones.

You have 4G aggregate KVA + UVA.

So if your KVA is 3G, and your UVA is 1G, then you can have 1 3G
KVA, and 1000 1G UVA's.


Certain aspects of KVA are non-swappable.  Some parts of UVA are
swappable in theory, but never swapped in practice (the page
tables and descriptors for each user process).

The closer to 4G you have, the more physical RAM you have to spend
on managing the physical RAM.

The total amount of physical RAM you have to spend on managing
memory is based on the total physical RAM plus the total swap.

As soon as that number exceeds ~2.5G, you can't do it on a 32
bit processor any more, unless you hack FreeBSD to swap the
VM housekeeping data it uses for swapping UVA contents.

Think of physical RAM as a resource.  It's seperate from the
KVA and UVA, but the KVA has to have physical references to
do paged memory management.  You are limited by how many of
these you can have in physical RAM, total.


-- Terry

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




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