Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question
3  
PAE allows a 32-bit system to use more than 3.2GB of RAM. If you have less RAM, or if you have a 64-bit system, you don't need it. I know of no problems with it. –  Marty Fried Jun 15 '12 at 2:58
    
@EliahKagan My system 32-Bit and my OS 32-Bit but my Kernels PAE . So what are the advantages and disadvantages with PAE kernels if I keep run with them . –  Raja Jun 15 '12 at 3:03
1  
The main issue is this: How much RAM does your system have? The advantage of PAE is that it allows you, with your 32 bit OS, to access more than 3.2GB of RAM. That is it's reason for existence. A 64-bit OS can already access much more memory, so it does not need any help. –  Marty Fried Jun 15 '12 at 4:16
    
@EliahKagan: Thanks, but I think perhaps the answer by izx will eclipse anything I could write. :) I didn't make it an answer because I didn't know for sure what the disadvantages were, if any, only that they were not big, and never bothered me. But you may be right that a simple answer in this case may be best. –  Marty Fried Jun 15 '12 at 4:19

3 Answers 3

up vote 16 down vote accepted

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

share|improve this answer
1  
So, if you have less than 4GB of RAM, are you saying 64-bit is faster than 32-bit? Why is that? Also, you make no mention of compatibility problems with 32-bit software that either has not yet been converted, or has bugs in the conversion - do you think this is ever a problem? It seems like it was, but perhaps this is a thing of the past. –  Marty Fried Jun 15 '12 at 4:24
    
Of course above comment have a point to think . –  Raja Jun 15 '12 at 4:39
    
@MartyFried Sometimes 64-bit is faster than 32-bit because compilers do things better for 64-bit. I don't remember the details, so maybe someone who does can expand on that, but I think it pertains to the biggest chunk of contiguous memory (even well less than 2GiB/4Gib) a program can allocate. –  Eliah Kagan Jun 15 '12 at 5:18
2  
The other things to keep in mind are (1) 64-bit may be faster because of the use of instructions added in the AMD64/EM64T instruction set (whereas with 32-bit most programs are compiled to the lowest common denominator for, at best, i686), and (2) 64-bit may be faster on machines with considerably less than 4 GiB of RAM because memory in RAM and memory swapped to disk are both part of each program's virtual memory space, and that virtual memory space is addressed with 32-bit pointers on a 32-bit system and 64-bit pointers on a 64-bit system. Pehraps izx can speak to some of these issues. –  Eliah Kagan Jun 15 '12 at 5:19
2  
@EliahKagan: do you think this Q might be a good candidate for a canonical Q: "I have a 64-bit processor but less than 4 GB of ram. Which kernel of the three should I choose?" –  izx Jun 15 '12 at 7:00

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:

http://kernel.ubuntu.com/~cking/power-benchmarking/blueprint-foundations-p-64bit-by-default/hpmini-and-x220-tests/results-3/results.txt

..may give some insight into pros and cons.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.