PAE Architectures

This is more of miscellaneous information rather then a tip or a trap.
I had a conversation with a colleague about 32-bit architecture v. 64-bit and the performance hit. His position was that 32/64-bit really didn't matter, that Microsoft Enterprise 32-bit architecture allowed "lots of RAM." My position was one of,there is still a hit that the OS takes when memory is above 4GB.

First, how does 32-bit address more than 4Gigs of memory? This is done with PAE, Physical Address Extension and was introduced with the Intel Pentium Pro. PAE adds a level to the page table hierarchy allowing it to handle up to 52-bit physical addresses. This is done by increasing the memory physical address size from 32-bit to 36-bit, 4-bits have been added. This is key because it doesn't change the 32-bit address space. The operating system must support PAE, Max OS X, and Linux support this, Redhat 6+ expects PAE. Microsoft Windows desktop editions enforce the physical address space to the 4GB limit even in PAE mode. This is done as a matter of licensing. Some drivers are also unstable when encountering physical addresses above 4GB. So for a desktop OS if you want more than 4GB you need to be 64-bit.

There are tricks that the OS can do, Address Windowing Extensions (Microsoft), mmap (Linux), these each involve overhead and writing to the file system. Microsoft 2003 Enterprise can support 16 GB, but there is no 64-bit version, R2 has both 32-bit and 64-bit versions, Microsoft 2003 R2 Enterprise supports 64 GB, however the 64-bit version supports up to 1 TB of memory. The 32-bit Datacenter versions of 2003 support up to 128 GB of RAM, this the largest 32-bit Memory support.

All of the 64-bit versions support significantly more memory, so clearly PAE is not an equivalent way to achieve 64-bit memory sizes. There is one additional problem with PAE and 32-bit OS -- applications. Many applications aren't going to be able to address any more memory above 3-4GB, even if the OS can address more. Furthermore, 64-bit OSes already support most 32-bit applications and are more efficient with memory and can handle more memory than the largest 32-bit OS (2003 R2 Datacenter).

Where ever possible use a 64-bit OS if you need large memory; because drivers are better, applications can take advantage of memory, you don't have to use "tricks" such as AWE or mmap with their overhead, and there is compatibility mode for 32-bit applications.

Back to the original question, the "hit," this is going to depend on the amount of memory required, the way the application is written, interaction with drivers, and if the application can run in "compatibility mode." So it will be a matter of how big a hit and does it matter in the end. We are both right -- there is a hit, but it probably isn't really enough to impact performance. There are probably other things more significant to the applications performance.