Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Apr 2007 08:31:53 -0400
From:      Bill Moran <wmoran@potentialtech.com>
To:        Ivan Voras <ivoras@fer.hr>
Cc:        freebsd-questions@freebsd.org
Subject:   Discussion of the relative advantages/disadvantages of PAE (was Re: Memory >3.5GB not used?)
Message-ID:  <20070425083153.1cfa3a38.wmoran@potentialtech.com>
In-Reply-To: <f0n1ug$5p1$1@sea.gmane.org>
References:  <01d301c78699$d6a36820$0300020a@mickey> <20070424140528.95287ff4.wmoran@potentialtech.com> <021201c7869f$ee90fd70$0300020a@mickey> <3ee9ca710704241144n4ab349c6m901586e427b1ae0d@mail.gmail.com> <021c01c786a0$fe7e5510$0300020a@mickey> <20070424145433.734761db.wmoran@potentialtech.com> <f0lrup$18a$1@sea.gmane.org> <20070424182027.33d16b28.wmoran@potentialtech.com> <f0n1ug$5p1$1@sea.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In response to Ivan Voras <ivoras@fer.hr>:

> Bill Moran wrote:
> 
>  > Does this test demonstrate usage of memory over 4G?  It's my 
> understanding
>  > that PAE starts to suffer when it has to look at the memory over 4G 
> (which
>  > is the problem it's intended to solve)
>  >
>  > If your entire test fits in under 4G, you're not seeing the worst of it.
>  > At least, that's my understanding of the issue.
> 
> I don't think that's how PAE works. AFAIK, it adds all the memory pages 
> it can find (including those above and below 4 GB) into the VM pool with 
> 64-bit addresses, so all of them can be used by the applications in an 
> uniform way. Kind of like swap works.

I'm no expert, so I did a little research:
http://en.wikipedia.org/wiki/Physical_Address_Extension

(of course, everyone knows that Wikipedia is the ultimate source of
information and is infallible, right?)

Anyway, based on that article, I would assume the performance hit comes
from the fact that access to memory has to pass through three layers of
pointers on PAE systems.  Which means every time you access RAM, you
have an extra lookup to find the address of the memory you want (compared
to ia32)  However, amd64 uses the same extra table:
http://en.wikipedia.org/wiki/Amd64#Virtual_address_space_details
so I'm unsure how amd64 manages to avoid the performance issue, if that
is indeed the reason for it.

PAE is still a 32 bit architecture.  This means that somehow the operating
system has to translate 32bit pointers in the application into 64 bit
pointers for actual memory access.  The Wikipedia article doesn't explain
how this is done, but it's possible (likely?) that this is a reason for
decreased performance as well.

-- 
Bill Moran
http://www.potentialtech.com



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