From owner-freebsd-questions@FreeBSD.ORG Wed Apr 25 12:32:01 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A5EC16A400 for ; Wed, 25 Apr 2007 12:32:01 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from mail.potentialtech.com (internet.potentialtech.com [66.167.251.6]) by mx1.freebsd.org (Postfix) with ESMTP id 5AB9213C48A for ; Wed, 25 Apr 2007 12:32:01 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from vanquish.pgh.priv.collaborativefusion.com (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.potentialtech.com (Postfix) with ESMTP id 98403EBC78; Wed, 25 Apr 2007 08:32:00 -0400 (EDT) Date: Wed, 25 Apr 2007 08:31:53 -0400 From: Bill Moran To: Ivan Voras Message-Id: <20070425083153.1cfa3a38.wmoran@potentialtech.com> In-Reply-To: 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> <20070424182027.33d16b28.wmoran@potentialtech.com> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.11; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Discussion of the relative advantages/disadvantages of PAE (was Re: Memory >3.5GB not used?) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2007 12:32:01 -0000 In response to Ivan Voras : > 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