32-bit or 64-bit for Linux desktop?

Various Linux distros have long been offering both 32- and 64-bit options for download.

While traditionally 64-bit was tout as “For more than 4GB of RAM”, those downloads are gradually becoming more common. So I decided to investigate a little deeper into what’s wrong with running 64-bit on smaller systems.

As it turned out, a well built 64-bit OS performs better than a 32-bit option of the same OS.

This finding was so profound that I couldn’t resist verifying it myself.

Indeed, if you look at the sizes of the distribution packages of popular software like web browsers and office suites, their 64-bit versions usually feature larger file sizes. Those 64-bit versions often appear to be more greedy for the system resources like RAM than the 32-bit counterparts.

The reasoning for better performance in 64-bit OS is quite obvious: besides doubling the size of CPU registers, the newer x86-64 architecture also has double the register count! And the data moves in-memory in larger chunks too. Simply put, a 32-bit OS doesn’t make any use of the most of the trillions of transistors new CPUs sport.

No wonder, compilers in the modern OS’es don’t hesitate to optimize the code compiled to take advantage of new processors. That is, if the application developer doesn’t make deliberate use of 32-bit specific techniques hindering the performance on 64-bit system.

BTW, besides the now-proven performance advantage the new tech gives, it also provides the flexibility for virtual environments where users more easily decide on resources allocation, including temporarily upping RAM sizes. In such situations it may be beneficial not to be limited by the 4GB ceiling 32-bit OS’es impose.

Here are the results of my own benchmarking of 32 and 64 bit desktop Linux systems.

The tests were standard “System Information” Linux Mint benchmarks run on two identical virtual machines with 1 GB of RAM and 2 CPU cores running stock Linux Mint 13(LTS) each. The VMs’ disks were backed by the host’s RAM drive, although this is irrelevant for the type of benchmarks done.

32-bit Linux Mint

CPU Blowfish
This Machine 3601 MHz 5.604
Intel(R) Celeron(R) M processor 1.50GHz (null) 26.1876862
PowerPC 740/750 (280.00MHz) (null) 172.816713
CPU CryptoHash
This Machine 3601 MHz 270.960
CPU Fibonacci
This Machine 3601 MHz 1.746
Intel(R) Celeron(R) M processor 1.50GHz (null) 8.1375674
PowerPC 740/750 (280.00MHz) (null) 58.07682
CPU N-Queens
This Machine 3601 MHz 6.167
FPU FFT
This Machine 3601 MHz 1.710
FPU Raytracing
This Machine 3601 MHz 13.828
Intel(R) Celeron(R) M processor 1.50GHz (null) 40.8816714
PowerPC 740/750 (280.00MHz) (null) 161.312647

64-bit Linux Mint

CPU Blowfish
This Machine 3601 MHz 6.471
Intel(R) Celeron(R) M processor 1.50GHz (null) 26.1876862
PowerPC 740/750 (280.00MHz) (null) 172.816713
CPU CryptoHash
This Machine 3601 MHz 318.827
CPU Fibonacci
This Machine 3601 MHz 1.682
Intel(R) Celeron(R) M processor 1.50GHz (null) 8.1375674
PowerPC 740/750 (280.00MHz) (null) 58.07682
CPU N-Queens
This Machine 3601 MHz 6.787
FPU FFT
This Machine 3601 MHz 1.795
FPU Raytracing
This Machine 3601 MHz 3.952
Intel(R) Celeron(R) M processor 1.50GHz (null) 40.8816714
PowerPC 740/750 (280.00MHz) (null) 161.312647

Note: all tests except “CPU CryptoHash” represent the time of execution, so they are “less is better”. “CPU CryptoHash” is measured in MiB/s, therefore it is “more is better”.