Re: physical memory limit of 64-bit linux

From: Martin Steigerwald
Date: Wed Dec 17 2008 - 09:31:15 EST


Am Dienstag, 16. Dezember 2008 schrieb Ingo Molnar:
> * Rafael J. Wysocki <rjw@xxxxxxx> wrote:
> > On Tuesday, 16 of December 2008, Martin Steigerwald wrote:
> > > Hi!
> > >
> > > What is the physical memory limit for 64-bit Linux? I read about 40
> > > bit address bus for AMD Athlon X2 (1 TB) and 48 bit for Barcelona X4
> > > (256 TB).
> > >
> > > Is 64-bit linux able to use that amount - provided that one would
> > > manage to build it into a machine? Or does it have a lower limit?
> > >
> > > Looking into the Google crystal ball gives unclear pictures... I tend
> > > to assume that Linux would handle it, but I am not sure.
> >
> > IIRC, the current maximal virtual memory space size of the kernel on
> > x86_64 is 2^46.
>
> Almost: the real current upstream kernel hard memory limit on x86-64 is 44
> bits, i.e. 16 TB.
>
> There's a couple of limits to consider here.
>
> Firstly, there's the architectural limit imposed by the CPU - that is 48
> bits, 256 TB. That is the full virtual memory range that x86-64 CPUs are
> able to address: non-canonical addresses outside that range create an
> exception.
>
> I.e. valid addresses on x86-64 are in the range of:
>
> [ 0xffff800000000000...0x00007fffffffffff ]
>
> Which is minus 128 TB to plus 128 TB.

[...]

> This problem is academic because there are no such systems in existence,
> and because we have another limit on the size of physical memory:
>
> arch/x86/include/asm/sparsemem.h:
> # define MAX_PHYSMEM_BITS 44

So this gives a real 16 TB for userspace applications or is it splitted into
minus 8 TB for kernel and plus 8 TB for userspace again?

How much memory can a process consume? On 32-Bit with 1GB/3GB split its 3
GB... are there special process limits on x86_64 or IA64?

BTW should any of those limits by documented outside of source or this
mailinglist? Maybe doesn't make too much sense cause it could change anytime
anyway.

Ciao,
--
Martin Steigerwald - team(ix) GmbH - http://www.teamix.de
gpg: 19E3 8D42 896F D004 08AC A0CA 1E10 C593 0399 AE90

Attachment: signature.asc
Description: This is a digitally signed message part.