Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Sep 2006 11:29:28 +0200
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        RJ45 <rj45@slacknet.com>, freebsd-questions@freebsd.org
Subject:   Re: memory problem
Message-ID:  <20060914092928.GA72951@owl.midgard.homeip.net>
In-Reply-To: <450918ED.6030206@infracaninophile.co.uk>
References:  <Pine.LNX.4.61.0609140220420.18820@slacknet.com> <450918ED.6030206@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



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