How big is a 64 bit address space?

By: Linus Torvalds (torvalds.delete@this.osdl.org), April 13, 2004 5:09 pm
Room: Moderated Discussions
Paul DeMone (pdemone@igs.net) on 4/13/04 wrote:
>
>Years of 2004 level global DRAM production to fully
>fill the address space of one 64 bit machine = 107
>
>Cost to fully equip the address space of one 64 bit
>machine with DRAM (2004 prices) = $2.7 trillion.
>
>Think about this the next time you hear someone ask
>when we will see the first 128 bit computers. ;-)

That's pretty disingenious, Paul.

There's a reason the virtual address space is called a
_virtual_ address space. And the reason is that it has
very very little to do with the _physical_ address space.

The virtual address space needs to be at least an
order of magnitude bigger than the physical address space,
and in many cases you want it to be _many_ orders of
magnitude bigger.

This is also the reason why the Intels old argument that
"We don't need more than 4GB of RAM on the desktop for
a few years" was so totally bogus. The same way a 32-bit
virtual address space has _nothing_ to do with 4GB of
physical memory, a 64-bit virtual address space has very
little indeed to do with 2**64 bytes of physical RAM.

Basically, if your physical memory size is even _close_
to the size of your virtual address size span, you're in
trouble. For example, a 32-bit virtual memory limitation
starts getting painful not at 4GB of RAM, but at about
512 MB.

Why? Because even with dense mappings, you need to map
physical memory multiple times - aliases are not just
common, they are _required_ by pretty much any operating
system (user vs kernel, but often in a cluster you may
also want to alias "local" vs "global"). Also, that same
virtual address space usually needs to fit non-RAM
mappings.

And mappings often are _not_ dense. We've seen overly dense
mappings over the last years exactly because of a squeeze
in virtual memory, and as a result OS's end up having to
put things closer together than is necessarily good, so
what is done in practice is not always what you _want_ to
do if you had the choice.

Using a much sparser layout means that you can grow a
virtual mapping without having to move other mappings,
which can be a _huge_ advantage for many algorithms. This
is why you'd sometimes want to have some extremely sparse
VM usage, because that allows you to effectively grow
"infinitely", while still allowing your algorithms to work
without having to re-allocate everything and switch all
pointers around, and without having to have unnecessary
code to have multiple "windows" into a potentially big
data structure.

Ask the database people why they want 64-bit addressing,
even though a lot of people could fit their data set in
just 4GB. Hint: the database still has to be written for
the _big_ case.

Sparse VM addressing also makes it much easier to find
bugs - stale/wrong pointers aren't likely to point to
active data if you use an allocator that doesn't put
things contiguously in the VM space, and doesn't re-use
the space aggressively. Both of these require that your
VM space is _much_ bigger than the amount of memory
you actually end up using.

And the people who would want more than 64 bits are the
people who don't work with single arrays of data that big.
They may want to be able to map arbitrary objects (that
might all dynamically grow over time), and they may not
have a fixed limit on the number of such objects.

Just imagine that you want to map objects that _might_
grow to several gigabytes each, but are usually smallish.
And you want your algorithm to handle millions and even
billions of these small objects - or alternatively handle
a few large ones.

So what do you do? You might map them with huge holes
in between each object (to allow for them growing to be
huge), but you still want to be able to have millions of
these objects around..

Yes, I think 64 bits is enough (and in fact, I think
current hardware is perectly ok in putting even lower
limitations on the mappings - most don't actually do
a full 64-bit TLB tag lookup, but limit the implementation
to something smaller).

So while I think 64 bits is fine, I also find your argument
totally bogus - the size of the 64-bit address space has
ALMOST NOTHING to do with available RAM.

If you want a relationship between physical RAM and VM size,
I'd expect 64-bit virtual address sizes to start being
limiting once you have ~50 physical address bits in use
for anything but a very boutique setup. That leaves "just"
three orders of magnitude for holes and aliases, which
should be reasonable.

(And 50 bits of physical address space is a _huge_ number,
Moore's law notwithstanding. Just plain physics make it a
really big number, we might just not get there in any time-
frame that is at all relevant for current architectures).

Linus
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
How big is a 64 bit address space?Paul DeMone04/13/04 09:07 AM
  How big is a 64 bit address space?cheesemower04/13/04 09:43 AM
    How big is a 64 bit address space?Speedy04/13/04 10:09 AM
      How big is a 64 bit address space?cheesemower04/13/04 03:18 PM
        How big is a 64 bit address space?cheesemower04/13/04 03:29 PM
  How big is a 64 bit address space?P4man04/13/04 11:46 AM
    How big is a 64 bit address space?hobold04/13/04 01:11 PM
      Been there, done that...Dean Kent04/13/04 05:44 PM
        Been there, done that...hobold04/13/04 05:58 PM
          Doctor, doctor it hurts when I do thisPaul DeMone04/13/04 06:44 PM
            Doctor, doctor it hurts when I do thisMarc M.04/14/04 07:08 PM
          EmacsRob Thorpe04/14/04 06:09 AM
            Emacsjohn evans04/14/04 05:57 PM
              EmacsDavid Kanter04/14/04 06:40 PM
                EmacsMarc M.04/14/04 07:20 PM
                Emacsjohn evans04/14/04 07:34 PM
  How many of what thing would you have to line upRick C. Hodgin04/13/04 12:52 PM
  How big is a 64 bit address space?Linus Torvalds04/13/04 05:09 PM
    How big is a 64 bit address space?Paul DeMone04/13/04 06:51 PM
      How big is a 64 bit address space?anonymous04/14/04 12:26 AM
        eh? this one went flying high over my head... (NT)Marc M.04/14/04 07:36 PM
      How big is a 64 bit address space?Interested in Illinois04/14/04 01:22 AM
        How big is a 64 bit address space?Marc M.04/14/04 07:33 PM
      How big is a 64 bit address space?Cezar Trifoi04/15/04 04:12 AM
        How big is a 64 bit address space?Paul DeMone04/15/04 09:03 AM
          How big is a 64 bit address space?Cezar Trifoi04/15/04 09:35 AM
            How big is a 64 bit address space?Paul DeMone04/15/04 09:43 AM
    How big is a 64 bit address space?anonymous04/14/04 12:22 AM
      How big is a 64 bit address space?Linus Torvalds04/14/04 12:56 PM
        How big is a 64 bit address space?cheesemower04/14/04 03:28 PM
        How big is a 64 bit address space?john evans04/14/04 04:42 PM
        How big is a 64 bit address space?Singh, S.R.04/14/04 11:59 PM
    How big is a 64 bit address space?asip04/16/04 05:23 AM
  How big is a 64 bit address space?Dean Kent04/13/04 05:48 PM
    How big is a 64 bit address space?cheesemower04/14/04 03:43 PM
      How big is a 64 bit address space?Dean Kent04/15/04 12:29 AM
        How big is a 64 bit address space?Jouni Osmala04/17/04 03:35 AM
  How big is a 64 bit address space?rwessel04/13/04 05:54 PM
  2^64 = 1.8e19 not 1.8e13 (NT)GuillaumeL04/13/04 05:55 PM
    What part of megabyte (MB) don't you understand? (NT)Paul DeMone04/13/04 06:55 PM
  How big is a 64 bit address space?Peter Gerassimoff04/13/04 07:26 PM
    How big is a 64 bit address space?anonymous04/14/04 12:30 AM
      How big is a 64 bit address space?Wouter Tinus04/14/04 04:20 AM
    Still Rick's post is relevant with that cube... (NT)Marc M.04/14/04 08:33 PM
  128 bit address space?SlartyBardfast04/15/04 11:26 PM
    Urban legends...Dean Kent04/16/04 12:08 AM
      Urban legends... (are sometimes true ...)Larry04/16/04 12:31 PM
        Urban legends... (are sometimes true ...)Dean Kent04/17/04 12:02 AM
    128 bit address space?Singh, S.R.04/16/04 01:55 PM
      128 bit address space?Tzvetan Mikov04/16/04 09:43 PM
      128 bit address space?Vincent Diepeveen04/18/04 10:27 AM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell green?