If you read my previous article on DOS memory models, you may have dismissed everything I wrote as “legacy cruft from the 1990s that nobody cares about any longer”. After all, computers have evolved from sporting 8-bit processors to 64-bit processors and, on the way, the amount of memory that these computers can leverage has grown orders of magnitude: the 8086, a 16-bit machine with a 20-bit address space, could only use 1MB of memory while today’s 64-bit machines can theoretically access 16EB.
All of this growth has been in service of ever-growing programs. But… even if programs are now more sophisticated than they were before, do they all really require access to a 64-bit address space? Has the growth from 8 to 64 bits been a net positive in performance terms?
Let’s try to answer those questions to find some very surprising answers. But first, some theory.
↫ Julio Merino
It’s not quite weekend yet, but I’m still calling this some light reading for the weekend.
I think the data size cost of 64 bit is underappreciated. Very often I see people looking to run Linux on older hardware with 4 GB or less ( say 2 ) and I always suggest considering a 32 bit distro to reduce the memory pressure. Almost always somebody will emerge to contradict me and talk about how much faster 64 bit distros are. That has not been my experience.
Now that we have Distrobox and friends, I think it is quite viable to have a 64 bit host OS with 32 bit guests. Very few of the individual applications that I run require access to more than 4 GB individually. Keeping them 32 bit has many advantages.
People seem to think that 32 bits are much more limiting than they are. How many bits do you need to index into an array? If you program in .NET, your integers are still 32 bits. How often is that a problem? Has that hurt or helped .NET’s performance on modern machines. I think it helps. ( ‘long’ integers are 64 bits on .NET by the way and ‘nint’ is whatever size the underlying platform uses natively. But ‘int’ and ‘uint’ are 32 bits. So is float. )
As the article points out, x32 was supposed to bring 32bit applications into the 64bit world. It made sense, but unfortunately it didn’t get any traction. Maybe AMD or Intel will pick it up for x86S-2
Debian is available in 64bit and 32bit versions while Fedora still has 32bit packages which can be installed from the repos.
Example:
$ dnf list python3
Last metadata expiration check: 0:00:11 ago on Thu 17 Oct 2024 07:38:04 PM CDT.
Installed Packages
python3.x86_64 3.12.6-1.fc40 @updates
Available Packages
python3.i686 3.12.6-1.fc40 updates