r/computerscience • u/Matheweh • 25d ago
Discussion Why Don't We Have 64-Bit Physical Addressing?
Since x86_64 (ig aarch64 and riscv64 too) architectures use 64-bit general-purpose registers, but current implementations limit physical and virtual addressing (e.g., to 48 or 57 bits), what engineering or physics or economics problem prevent us from building a CPU with a full 64-bit physical address space (supporting 16 EiB of RAM)?
I don't know anything about how CPUs really work so mind my stupid question.
304
Upvotes
65
u/Broad-Promise6954 25d ago edited 25d ago
There's nothing in electronics or physics to limit this, but there's plenty in economics, as there are always tradeoffs to make (some of which are electronics / physics based so you can stretch this around however you prefer).
The TL;DR variant is that it costs more to use more bits so they originally went to 48 bits as a convenient compromise. That put them in a bit of a box when the compromise turned sour, so they added an enable (LA57 in this case) for the next compromise they picked. If and when this one gets old and moldy they'll add another enable flag, etc.
(I'm on phone, can expand on the compromise thing when I'm back on a real keyboard)
224
u/fixminer 25d ago
Because that amount of RAM doesn't exist. Why would we include useless pins, traces, etc.?
17
u/zeekar 25d ago
because you don't have that much RAM. Nothing does. We're getting to the point where big cloud machines have more RAM than 48 bits can address, so they have more address lines, but no machine has sixteen ebibytes of RAM. Every one of those address lines is a pin on the CPU package that can't be used for anything else... why waste it?
3
u/Cold-Jackfruit1076 24d ago edited 24d ago
The simple answer, without getting bogged down in too much technical jargon: there's simply no reason to do it. There isn't a single computer anywhere in the world that uses anywhere near 16 EiB of RAM1, and no foreseeable use case for that much memory.
The technological outlay is enormous. Every address bit needs a wire from the CPU to the RAM; to address 16 EiB (264264 bytes), you'd need billions of unique wires (something in the range of 15 billion for a single motherboard).
Not to mention that the memory bandwidth and access time of that much RAM would be unworkable; you simply can't move data fast enough to make the CPU wait for it on any practical timeframe. It would take ~270 years to simply scan the entire 64-bit address space.
The other consideration is heat: that much RAM would generate 402 megawatts -- enough to power 400,000 homes -- and if the cooling failed for even a moment, the entire thing would fry in a few seconds.
1Ā The largest single-socket server configurations currently available are typically maxed out around 4ā8 TB to 32 TB, and even Livermore's exascale supercomputer El Capitan only uses 5 petabytes, distributed across thousands of processors.
6
u/endstop 24d ago
With modern Intel or AMD CPUs you're all set to 128 PiB.
https://en.wikipedia.org/wiki/Intel_5-level_paging
Let us know if you've got a system that can even approach physically accommodating that and around a billion USD to buy the RAM.
Memory training at boot would likely take 1500 years. Make sure to get the CTO absolutely wasted before pitching the project.
2
u/Emu1981 21d ago
We don't have 64-bit physical addressing because the cons far outweighs any sort of potential benefit that you get from being able to address 16 exabytes of RAM. 64 bit physical addressing would require extra circuitry (and power draw) inside the CPU and memory controller to be able to handle the extra 20-26 bits of addressing that isn't needed with 48-52 bit physical addressing like we have today. There is no benefit either because 48 bit addressing can handle 256TB of physical address space which is significantly more than most computer users will ever need and for those who 256TB of addressability is not enough there are CPUs that support 52 bit addressing which can handle up to 4PB of physical address space.
Compare that to the fact that 512GB DDR5 DIMMs are only in platform validation at the moment, where even having 32 DIMM slots will only get you up to 16TB of RAM which is far lower than the 256TB limit of 48 bit addressing.
You may read this and wonder why 52 bit addressing even exists but that brings up the fact that stuff other than RAM in the system can be mapped into the physical address space like GPU VRAM, and new storage technologies like NVDIMMs and CXL which can push the addressability requirements far past 256TB.
4
u/rupertavery64 24d ago
Using google back-of-the-napkin AI calculations, 16 Exabytes of RAM weighs approximately 1,678 metric tonnes if you use the dense memory standards available today, assuming 256 GB RAM sticks that weigh 25 grams each.
That is roughly the weight of 3.5 fully loaded Boeing 747 airplanes
16 Exabytes = 17,179,869,184 GB
at 256 GB / stick = 67,108,864 sticks
67,108,864 * 25g = 1,677,721,600g or 1,677,721kg
2
u/MagicWolfEye 25d ago
Do you really need to be able to address 16 exabyte
2
u/granadesnhorseshoes 24d ago edited 24d ago
Every additional bit you add doubles the available address space. 16 bits caps out at 64KB, 32bit caps out at 4GB. so the jump was from 64KB to 4096MB
64bit caps out at 16EB. So that jump from 32 to 64 was from 4GB to 17.1 billion GB.
Needless to say, they save on cost and effort by not bothering to physically implement the circuitry for ALL 64 bits.
Edit: KB for the 16-bit cap, not MB.
1
u/Eggy002 24d ago
why would we even need that much ram when were still not using all the 512 tb some systems offer now
1
u/fcddev 24d ago
Several reasons:
1
u/FedUp233 24d ago
One thing I donāt think I saw mentioned is what problem are you going to solve that needs that much memory all addressed by a single cpu? To effectively use that much memory youād probably need to add many more cpu cores. And thatās a diminishing return problem since the more cores, the less memory bandwidth each core gets.
Plus, the deeper the page tables get they also tend to get slower. I think the cpus have kind of reached the li it where deeper page tables would also start to be counterproductive. So the other option is to increase the page size. 7 more address bits would be pages 128 times the current 4k size which is probably ridiculous so maybe a compromise of 64k or 128k pages plus a bit wider page table. Of course, do you want to use the same cpu with less memory? Having multiple page sizes would mean a lot of logic in the memory address logic and again slow it down. Or do ypu build a complete separate IC just for the big memory systems - with really, really low production numbers and or a flexible one with lower performance and higher cost for the vast majority of users who donāt need anywhere that much memory.
And of course if you have lots more cpu cores, you need more cache memory for each of them, plus to get similar cache hit frequency you need much bigger L2 and L3 caches as well.
So in the end you are probably better off with machines with less memory for all the foreseeable problems. And for solving multiple problems better off with several smaller machines or a cluster of smaller machines.
Basically, there just is no market for single machines with memory of those sizes.
1
u/SapphireLabs_Yuki 24d ago
We do. The upper 14-17 or so are reserved for other purposes. No point in addressing the entire 64 bit space if it can't be used to begin with, and it would add an extreme amount of circuitry that would literally never get used.
1
u/RobertTheTraveler 24d ago
Afaik DEC Alpha was fully 64 bit.
1
u/bigvalen 24d ago
It's about $9 billion to buy the 256TB you would need to max out the memory of a single Xeon CPU. We should be good for a while.
Our machines with 3TB take about 8 mins to test & init ram on boot. I can't imagine the time on 256TB machines :-)
1
u/Maleficent_Cycle561 24d ago
All the answers are great. As a tldr analogy, the best tool for a job is the right tool not the most powerful or biggest tool or most expensive one. My car doesn't need and doesn't do the job I need with a jet engine, it can't functionally be used. The gearing ratio in my drivetrain isn't the power powerful, but it is well suited to the powerplant(engine) which is well suited to the fuel system, which is well fitted to the constraints of the usecase. Just as my car can't meet the use case where a jet engine is useful/necessary nor massive gear ratio drivetrain (tractors etc).
Obviously those analogies are technologies that have use cases. So back to the mathematical answers, there's no current practical use case. However there is a usecase for unbounded growth, which that headroom supports. We're also bounded by power of 2 steps, so it needed to be 64bit.
1
u/Camofelix 24d ago
it's not useful, costs verification time, area, and power. silicon is mostly a zero sum game. we don't support anything we don't need.
and the things we barely need, we barely support (see the 8087)
1
u/throwaroo202020 24d ago
Each one of those bits needs to be a physical wire between the cpu and ram. The more wire, the more complex and expensive cpus and motherboards become.
1
u/Other-Biscotti6871 23d ago
Mostly because that's too much stuff to pack in one machine; when you work across machines you move into the 128-bit space of IPv6 Internet.
There's an argument that the progression should have been 24/48/96 rather than 32/64/128 from what the physics does, but the 32-bit stuff appeals to the software engineers over 24-bit, because it's a straight doubling (8/16/32).
Physically, a RISC processor can efficiently address about 2MB of RAM directly, to do more than that the 2MB becomes the L2 cache, and data in the larger space is swapped in and out of it. Doing address calculations for a space bigger than you need costs in time and energy, Intel crushed Sun because Sun moved to 64-bit, and that made their processors slower, Intel stuck with 32-bit which was good enough for webservers and 80's PCs.
1
u/xzgyo 23d ago
ęÆå°ēčØčÆ“640kbå åå¤ēØäŗ
1
u/david-1-1 23d ago
I understood the move from 16 to 32 bits, but not to 64 bits. In instruction space, 32 bits is complex enough for register and memory references, and opcodes. But even if true 64 bit addressing were easy to do, you'd have to pack multiple instructions into such long words! It doesn't make sense.
1
u/InternalImpact2 23d ago
Too much wires
1
u/naemorhaedus 21d ago
because it isn't necessary. Why waste resources?
1
u/This_Maintenance_834 25d ago
if someone has all the money in the world, then he can only build two computers with a full 64-bit memory populated. no one else will get any memory in the world.
Altman will be pissed.
1
u/tropix126 24d ago edited 24d ago
For virtual addresses on x86-64, you can get up to 57 bits if the CPU does 5-level paging. The architectural reason for why it doesn't take up all 64 bits is because A) it's unnecessary for current hardware, and B) x86-64's pagetable entries are 64-bits wide and need to store some metadata for each entry, meaning the address bits can't take up the whole entry because they need room for that metadata.
On AArch64, the reason is slightly different. Depending on the processor features, the architecture actually uses those bits for security extensions like pointer authentication (PAC) and memory tagging (MTE). The exact number of bits reserved for virtual addresses is reported by the ID_AA64MMFR2_EL1 sysreg and is processor-dependent ranging from 48-56 bits.
0
u/TheologyFan 25d ago edited 24d ago
281474976710656 (2^48) bytes is plenty of ram for now. Some day it might not be but for now it is far more than enough. Before 32 bit addressing there was 20 bit addressing back when 1 mb was a lot of ram. The trade offs of larger address space donāt need to be made if you canāt physically produce that much ram.
What are those trade offs? Modern computers use virtual memory so each program can think it has access to all of the memory (and a verity of other benefits). This means you need to store a mapping from virtual to physical memory and in 32 bit addressing this was achieved with 2 level page tables. With 48 bit addressing 4 level page tables are used, 64 bit addressing would need even more levels. More levels is slower because the memory management unit (MMU) needs to traverse these page table levels.
-3
u/aka1027 25d ago
A quick googling yields,
āBecause that's all that's needed. 48 bits give you an address space of 256 terabyte. That's a lot. You're not going to see a system which needs more than that any time soon.ā
Stack overflow
0
u/CypherAus 25d ago
Coz 48 is huge and 57 is huge-er. 64 is just not needed.
0
u/Altruistic-Rice-5567 25d ago
Ethernet physical addresses were created long before we had 64-bit computers as common. It was probably already a cost stretch to go with 48-bits.
0
u/Greedy-Thought6188 24d ago
Technically we're not even blocked by 64 bits. We can just introduce an extension that allows entries in late tables to be however large we want. Virtual memory would be slightly more tedious but that can also be done. The cost and the speed of access are a bigger concern.
0
u/mckenzie_keith 24d ago
There is no RAM that big. Each bit of address doubles the size of the RAM. The high order address bits would not have anything to connect to. Designing the CPU to support 64 bit addressing would not be a big deal. Actually having that much RAM is. So they stop at whatever they think is a reasonable number of bits for the foreseeable future.
0
u/stevekez 24d ago
We use the extra bits for other purposes seeing as we can't have that much physical RAM to address. Tags and authentication codes amongst other things.
0
u/force_disturbance 24d ago
The physical addresses are for the CPU (or some small number of CPUs) to read/write real physical RAM. That RAM must be close to the CPU, typically on the mainboard. You literally can't fit the RAM to answer all those addresses in a single computer (or even single room)
You'd need 64 million of the absolutely densest RAM sticks we could make, and all of those directly connected to the CPU.
0
u/rennurb3k 24d ago
Even if you had all the ram , the main reason is that each process get its own isolated memory tree ( or in case of fork an on demand version with cow)
0
u/hansendc 24d ago
Itās pure economics. Pure opportunity cost.
Each physical address bit costs physical wires. A literal physical wire from the CPU to the memory system. It is a waste of space that could be used for better things to make your computer faster.
There are also lots of physical addresses plumbed all over the CPU. A bigger physical address means more silicon to store these bits and bigger, deeper, slower logic to process the addresses.
āCheatingā by making the address sizes smaller makes the computer faster.
P.S. Do not get me started on virtual addresses. They arenāt really 64-bits either. The canonicality hole causes all kinds of fun for software.
-1
u/TheMrCurious 25d ago
Search YouTube
0
u/Select-Reason6584 23d ago
There is no RAM configuration of this size. We're not going to add pins and traces that have nothing to connect to.
0
u/Fickle_Draw9848 23d ago
This RAM capacity isn't manufactured in the first place. Why add pins and traces that will never be used?
0
u/[deleted] 24d ago
Suppose my PC had 2**64 bytes of memory and I wanted to scan that memory, a 64-bit word at a time, and add up all the values.
Doing that for 2GB (requiring 31 address bits) takes about 1 second. For 64 bits' worth, which needs 33 extra address bits, it would take 2**33 seconds.
That's about 270 years. So even if I had it available, I wouldn't live long enough to do much with it!
Since I have 8GB RAM, that would be 2**31 more than I have a present, which is also 2 billion times more in cost, size, weight, power, heat and every other measure you could think of.