32-bit vs. 64-bit Memory Impact

One downside of moving from 32-bit to 64-bit is that memory pointers are twice their size. In other words programs in memory require more RAM. But does it matter in practice?

To find out I ran the 32-bit version of Ubuntu 14.04 from a USB stick and compared the used and available memory in different situations on the same system when booting from a different memory stick with the 64-bit version of the OS.

And here are the results:

After Booting

After booting the system I compared the free and available memory with only “Gedit” and a bash shell open to copy the results of the “free” command to a text file:

             total       used       free     
32 Bit Mem:  3718052    1387320    2330732
64 Bit Mem:  3629052    1323768    2305284

There isn’t a lot of difference between the values for used memory, the 32-bit version actually takes a little bit more memory than the 64-bit version. But that’s probably not quite correct as the total memory available is a bit smaller on the 64-bit OS than it is on 32-bit. I’m not sure what the reason for that is as I ran both OSes on the same hardware. As far as free memory is concerned the values are almost identical, there is only 30 MB less memory available on the 64-bit OS, i.e. 98%

Used And Free Memory With Firefox and Some Web Pages

Let’s have a look how things look like after Firefox is running and has loaded three rather heavy web pages (Heise, Spiegel, Zeit):

             total       used       free     
32 Bit Mem:  3718052    2016904    1701148
64 Bit Mem:  3629052    2249332    1379720

Now the picture looks quite different! On the 64-bit OS Firefox requires over 200 MB of extra RAM, which is roughly 10% more. On the free side, instead of 1.7 GB, only around 1.4 GB are still available. That’s roughly 20% less free memory in this scenario.

Things are even worse when you compare Firefox memory consumption 32-bit vs. 64-bit. On the 32-bit system Firefox requires (2016904 – 1387320) = 629,584 bytes of RAM. On the 64-bit system, Firefox requires (2249332 – 1323768) = 925,564 bytes of RAM. That’s a difference of 295,980 bytes for the same content or over 47% more!

On my media PC, which has 4 GB of RAM I can live with this as I don’t run many programs in parallel. But on a notebook on which I do other things as well and many of them in parallel I would think more than twice before installing the 64-bit version of the OS.

Fortunately, my notebook I use for everyday work has 8 GB of RAM. But even here I’m not sure if I should upgrade to 64-bit as already today it’s sometimes a challenge to run two Virtual Machines simultaneously. The last thing I need is 10% or 800 MB less RAM even in the best case, which is what this comes down to.

So before upgrading to 64-bit there I need…. MORE RAM!

P.S.: Some more details on the topic in this interesting thread over at AskUbuntu.