Ubuntu – Does 32-bit PAE with more than 4GB RAM improve speed


I would like to buy a Thinkpad T420 with 8GB RAM configuration and install specifically 32-bit Ubuntu Desktop with PAE as I heard that 64-bit version has some issues such as providing support for applications based on Flash. Theoretically more RAM gives better speed, but practically there could be some issues such as consuming more power etc. Therefore, I am not sure whether I can get improved speed if I use Ubuntu 32-bit PAE with 8GB RAM instead of 32-bit PAE with 4GB RAM or not, specifically for watching streamed movies, playing videos, video encoding etc. Therefore, I am in dilemma whether to buy T420 with upgarded 8GB RAM or not?

Best Answer

PAE with 8GB RAM may be faster than a machine with 4GB RAM, by avoiding paging. PAE with 8GB RAM will also probably be slower than a 64-bit kernel with 8GB RAM, due to PAE overhead. Just how much faster or slower depends on what you use the machine for.

Flash works reliably on 64-bit Ubuntu, so it's no longer a reason to install a 32-bit OS. 32-bit binaries will just run on 64-bit Ubuntu without you needing to do anything special. So the short story is, today, if you have 4GB or more of memory, you should just install a 64-bit kernel.

Phoronix did some benchmarks showing a substantial disadvantage to PAE on some tasks.

More RAM uses more power, and gives more opportunities for something to fail. The main benefit is that with more RAM, your machine needs to do less physical disk IO, but this is only a benefit up to the point that all the data it touches fits in memory. So, there is no point installing more memory than will actually be useful to fit your typical working set.

specifically for watching streamed movies, playing videos, video encoding etc

The first two don't need a lot of memory; only enough to make sure your browser and video player are not paging. The second is mostly cpu-bound, not ram-bound.

So, either 4GB or 8GB memory would be fine. If you expect to do development or other more memory-intensive tasks later, get 8GB. Either way, install a 64-bit kernel.

The AMD deck "Myths and facts about 64-bit Linux" from 2008 makes these points:

  • 64-bit mode allows more registers, wider registers, and new instructions, so both applications and the kernel can be more efficient, even ignoring the issue of memory use
  • 64-bit mode is often faster even on machines with under 3GB RAM
  • 32-bit apps run very well on 64-bit kernels

Since 2008 most applications will be primarily developed in and tuned for 64-bit mode.

Related Question