For a 32-bit kernel, what are the pros/cons of PAE vs. non-PAE?

I am using Ubuntu 12.04 32-bit. My kernels are PAE kernels. I know these are the kernels we can use for 32-bit OS which have 4 GB RAM, to utilize all 4GB of RAM.

My system is a 32-bit system. So I thought I don't need them. What are the advantages and disadvantages I am going have if I keep running PAE kernels?

raja@badfox:~$ uname -a
Linux badfox 3.2.0-24-generic-pae #39-Ubuntu SMP Mon May 21 18:54:21 UTC 2012 i686 i686 i386 GNU/Linux
4

3 Answers

Short answer: Go 64-bit if you can, which is faster than both PAE/non-PAE 32-bit; if you cannot, non-PAE may be 1-2% faster than PAE.


In theory PAE has a slight overhead over non-PAE...

  • The big advantage of PAE is allowing a 32-bit processor/system to use more than 4GB of RAM
  • But this requires slightly more overhead over non-PAE, which can lead to slightly decreased performance.
    • Here's a very simple explanation: in non-PAE mode, a 32-bit CPU must lookup (access) two tables to access a physical memory address; in PAE-mode, it must lookup three tables to do so. The one additional lookup requires some (very small) extra time, thus imposing additional overhead.
    • At the end of this answer are two images from the Wikipedia PAE article, illustrating the above point.
    • NX/XD bit: The PAE kernel also supports the No-eXecute/eXecute-Disable bit on 64-bit processors; this can help prevent some kinds of virus/malicious attacks (buffer overflows), but IMO this doesn't matter much when choosing 32-bit kernels for Ubuntu.

...but in practice this overhead is negligible (almost nothing)...

  • Phoronix has done a number of tests over the years which show that on systems with 4GB or less, the PAE kernel may be at most approximately 5% slower than the non-PAE kernel. This is only for a specific test application; the usual difference is less than 1%.

and 64-bit almost always beats BOTH 32-bit kernels - go for it!

  • The one thing those Phoronix benchmarks above tell you is that 64-bit is king -- even if you have less than 4GB of RAM (although I'd recommend 1GB as the minimum)
  • If you have a 64-bit processor -- generally anything after 2006 except Intel Atoms -- you are probably losing performance by using a 32-bit kernel!

Comparing non-PAE vs. PAE page table accesses:

  1. Non-PAE

    enter image description here

  2. PAE

    enter image description here

10

For some real-world data, here are some benchmarks I gathered for i386, i386-pae and amd64 installs on an Atom based netbook and Sandybridge based laptop:

..may give some insight into pros and cons.

I had serious troubles using 32-bit 12.04 with certain software (zfs filesystem), unveiling the vmalloc limitations of 32-bit systems ( I have tried both pae and non-pae and vmalloc and depmod params tuning, to death... but no success). That is probbably a special case, but could be given as an example. Limitation somewhere deep inside 32-bit kernels is 1GB, even if upto some 3.2 GB is usable.

Go for 64-bit if You can. I am pretty sure that Tou vcan... I guess that to date, it (=64bit cpu core) should be supported by almost any running system. Later "upgrade" is somehow uneasy (it means reinstall in fact, even if dpkg and copying /etc/ and /home/ may help bringing new installation running..) but still should be acceptable. I think that there are no problems to be afraid of with 64-bit, not even if You are forced to use old/closed source 32bit application or some libraries for some reason.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like