On x86 architecture, why are there fewer bits for virtual address space than physical?

Here is a picture of an AMD64 page table (from the AMD Architecture Programmer's Guide, Vol. 2, Rev 3.23, 2013, page 132).

AMD64 Longmode page table

The "natural" size of a page in AMD64 architecture is 212=4096 bytes. (There are modes where you can have 221=2Mbyte pages, but we're going to ignore them for now.)

Each Page-Table Entry (PTE) (or, depending on level called PDE, PDPE or PML4E) is 64 bits = 23 bytes. So there are 29 entries per page. So 4 levels of page table gets you 4x9+12=48 bits of virtual address per process. Walking the page table is expensive, so they won't expand to 5 or 6 levels unless/until there is consumer demand.

I'm not sure why they decided on a 52-bit physical address limit. This can be extended up to 63-bits in the future. At October 2013 prices (about 1US$/Gigabit for 4Gbit chips) it would cost over 32,000,000.00 US$ to build a 252 byte memory, so it will be a while before there is any significant demand to increase the physical address limit. There are all sorts of reasons why you want to keep physical addresses as small as possible: the TLB and cache tags have to hold physical addresses, for example.

It's not necessarily backwards that there is more physical memory than virtual. Virtual memory is per process while the physical memory is shared by all processes. So a server with 48-bit virtual addresses and 252 bytes of memory could support 16 simultaneous processes and still guarantee not to need to swap.


A few points to consider, physical RAM is expensive. Sure 16 GB is cheaper now that 4GB was only a few years ago, but 2^64 (16 exabytes) ridiculously large.

So AMD's extensions of the x86 for x64 "allowed" up to 2^52 by limiting the registers. This does two things, lowers the cost of processors and improves performance. More registers that are not used means that there is a lot of empty space that must still be taken into account during operations.

And, in case you are not a math guy... The difference between three sizes is huge! I am no math guru, but by decimal 52 bit is about .02% of 64bit. 48 bit is 6% of 52. (someone check my math?)

As for why AMD allowed more physical RAM then virtual, the article states it is because AMD was thinking of servers. Servers need large amounts of physical RAM. Virtual RAM is too slow to support the average server applications for hundreds or thousands of employees.

My own thoughts: We have left the time when RAM was tiny, and hard drives had to support RAM. The price in RAM has fallen to a point where the average persona can put in more than enough RAM. Take typical applications, like Office which requires 1-2GB of RAM. My computer 7 years ago could handle that. Although with read and write speeds to disk, I would hope I never had to retrieve a 7GB file from virtual memory (using the old PM * 2.5 philosophy).

I also can only assume AMD wanted to leave room for registers that use the physical RAMs registers, like RAM on integrated GPUs.