From owner-freebsd-questions@FreeBSD.ORG Thu Sep 14 09:29:29 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B0F4716A407 for ; Thu, 14 Sep 2006 09:29:29 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from pne-smtpout1-sn2.hy.skanova.net (pne-smtpout1-sn2.hy.skanova.net [81.228.8.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BEA443D49 for ; Thu, 14 Sep 2006 09:29:29 +0000 (GMT) (envelope-from erikt@midgard.homeip.net) Received: from falcon.midgard.homeip.net (83.253.29.241) by pne-smtpout1-sn2.hy.skanova.net (7.2.075) id 450708BC0006B098 for freebsd-questions@freebsd.org; Thu, 14 Sep 2006 11:29:28 +0200 Received: (qmail 47776 invoked from network); 14 Sep 2006 11:29:28 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with SMTP; 14 Sep 2006 11:29:28 +0200 Received: (qmail 72984 invoked by uid 1001); 14 Sep 2006 11:29:28 +0200 Date: Thu, 14 Sep 2006 11:29:28 +0200 From: Erik Trulsson To: Matthew Seaman Message-ID: <20060914092928.GA72951@owl.midgard.homeip.net> Mail-Followup-To: Matthew Seaman , RJ45 , freebsd-questions@freebsd.org References: <450918ED.6030206@infracaninophile.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <450918ED.6030206@infracaninophile.co.uk> User-Agent: Mutt/1.5.11 Cc: RJ45 , freebsd-questions@freebsd.org Subject: Re: memory problem 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: Thu, 14 Sep 2006 09:29:29 -0000 On Thu, Sep 14, 2006 at 09:55:09AM +0100, Matthew Seaman wrote: > RJ45 wrote: > > > THe system has exactly 4GB of memory but the memory is not complitely > > seen by the system. > > > > At boot thime I Get this warning > > > > 524288Kb of memory above 4GB ignored > > A normal 32bit OS can only address 4GB RAM -- but your system has various > L2 and other caches built into the CPUs, etc., which count towards the total > RAM count. So the excess is trimmed from the main memory. Not quite true. The caches have absolutely nothing whatsoever to do with this. It is various I/O devices (graphics card, ethernet controller, hard disk controller, other PCI-devices, etc.) that also need to be mapped into the 4GB address-space. Usually the top-most 512MB of this address space is reserved for the I/O-devices. If you have 4GB (or more) of memory then you can't fit all of it as well as the I/O devices into a 32-bit address space, so the memory above the 3.5GB limit is then either completely ignored or (as in this case) remapped to addresses above the 4GB limit. Unfortunately the OS (being only 32-bit aware) cannot access that remapped memory. > > If you need to use more than 4GB RAM then either switch to a 64Bit OS, or > investigate 'PAE'. > > You can run the 64bit version of FreeBSD on Intel Xeons (so long as they > support EMT64) or the various AMD 64 bit processors. Xeons don't have as > complete 64-bitness as Opterons so performance may not be as good as running > 32bit. Mind you that sort of thing depends heavily on the particular > workload and you should benchmark against your expected workloads. > > PAE 'Page Alternate Extensions' is frankly a bit of a haque to allow access to > more than 4GB RAM by giving each process it's own separate 4GB address space, > rather than sharing the space between all processes. Any one process cannot > grow beyond 4GB, but the total over all processes can be more than 4GB. There > is support in FreeBSD but with some severe limitations. Many drivers are not > compatible with a PAE system. > > > > and then if I check > > > > real memory = 3757965312 (3583 MB) > > avail memory = 3678597120 (3508 MB) > > > > I do not know why this happens. > > That number is the amount of memory less what is wired down for the kernel. > If you're on a 'big' system -- with lots of RAM -- then the kernel itself > has to be larger because it needs to allocate memory to contain page mappings > etc. etc. Approximately 500MB consumed by the kernel is not unreasonable for > such a machine. -- Erik Trulsson ertr1013@student.uu.se