32bit 64bit OS and RAM Limit

About the 32bit/64bit and RAM size

WiKi and MSDN

Today met some 32bit and 64 bit issues…….?*&(#&*&$&*#*&$……But understand now!

No need to explain what is 32 bit and 64 bit at here I think. 64bit OS software cannot install on the 32 bit hardware/CPU system. But most 64 bit OS normally can run on the 32bit hardware, with the performance tradeoff. As the bit limit, default 32bit OS cannot access the RAM around 4GB (What a reasonable but awkward bug!), then INTEL produces something called Physical Address Extension (PAE), to let x86 and x86-64 processors that allows more than 4 gigabytes (GB) of physical memory to be used in 32-bit systems.  But in this case, not only the CPU, your OS also need to support the PAE, to let your 32 bit OS can access the >4GB RAM.  So how to check the system support it or not? Here is a list to future check from Wiki page:

Windows

PAE is supported in the following versions of 32-bit Windows:

Version

Maximum Physical Memory

Windows 2000 Advanced Server

8 GB

Windows 2000 Datacenter Server

32 GB

Windows XP [12]

4 GB

Windows Server 2003 Enterprise Edition

32 GB

Windows Server 2003 R2 (or SP1) Enterprise Edition

64 GB

Windows Server 2003 Datacenter Edition [13]

64 GB

Windows Server 2003 Standard Edition

4 GB

Windows Vista

4 GB

Windows Server 2008 Enterprise or Datacenter Edition

64 GB

Windows Server 2008 other editions

4 GB

 Windows XP SP2 and later, by default, on processors with the no-execute (NX) or execute-disable (XD) feature, runs in PAE mode in order to allow NX. The NX (or XD) bit resides in bit 63 of the page table entry and, without PAE, page table entries only have 32 bits; therefore PAE mode is required if the NX feature is to be exploited. However, desktop versions of Windows (Windows XP, Windows Vista) limit physical address space to 4 GB for driver compatibility reasons.

Linux

The Linux kernel includes full PAE support starting with version 2.6, enabling access of up to 64 GB of memory on 32-bit machines. A PAE-enabled Linux-kernel requires that the CPU also support PAE. As of 2008, many common Linux distributions come with a PAE-enabled kernel as the distribution-specific default.

Mac OS X

Mac OS X for Intel Macs supports PAE and the NX bit on all CPUs supported by Apple (from 10.4.4 – the first Intel release – onwards). Mac Pro and Xserve systems can currently support 32GB of RAM, even though the Mac OS X 10.5 Leopard kernel remains 32-bit.

Solaris

Solaris supports PAE beginning with Solaris version 7. However, third-party drivers used with version 7 are not specifically written to include PAE support may operate erratically or fail outright on a system with PAE.

FreeBSD

4.x series starting with 4.9, in the 5.x series starting with 5.1, and in all 6.x and later releases. The kernel PAE configuration option is required. Loadable kernel modules can only be loaded into a kernel with PAE enabled if the modules were built with PAE enabled; the binary modules in FreeBSD distributions are not built with PAE enabled, and thus cannot be loaded into PAE kernels. Not all drivers support more than 4 GB of physical memory.

How to check PAE on Linux?

So for Linux, how you know your kernel can support or not? To list your Linux version first:

cat /proc/version

cat /etc/redhat-release

To check the Kernel whether support the INTEL PAE for more than 4GB RAM

grep pae /proc/cpuinfo

If you see the CPU’s flag has the pae inside, the kernel config support PAE. If you have install the big RAM in machine, then, just to list free memory:

free -t –m

You will know that big ram is usable or not!  For redhat Linux version, just check here: http://www.redhat.com/rhel/compare/

How to enable PAE in windows system?

After installing Windows 2000 (Datacenter Server or Advanced Server) or Windows 2003, system properties shows that only around 3.37 GB of physical memory (RAM) is available for application and system use, although 4 GB or more RAM modules have been installed, and BIOS can correctly identifies the full installed size of physical memory, which means that the motherboard and x86 or x64 CPU processor can support more than 4 GB of physical memory.

32-bit Windows operating system depends on PAE (Physical Address Extension) feature to use more than 4 GB of physical memory. On most Windows 2000 and Windows Server 2003 system, especially those run in NUMA mode on a NUMA-capable computer. PAE is disabled by default. PAE is enabled by default only if DEP (
Data Protection Execution) is enabled on a computer that supports hardware-enabled DEP, or if the computer is configured for hot-add memory devices in memory ranges beyond 4 GB.

Thus, if PAE is not enabled in Windows 2000 and Windows Server 2003 (for example, if DEP is turned off by administrator), the system may not able to detect, identify and see more than 4GB memory, and will have to allocate slightly more than 3GB of memory for system and application only as some memory address space has to be reserved and mapped for system devices and peripherals.

To enable PAE in Windows Server 2003 and Windows 2000 (and Windows XP), append the /PAE switch to the end of the line of operating system in the Boot.ini file. To disable PAE, use the /NOPAE switch. The Boot.ini normally located in the root folder (i.e. C:\) with Read-Only and Hidden attributes, which are required to be removed before the file can be edited.

For example,

Original Boot.ini:

[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT=”Microsoft Windows 2000 Advanced Server”
/fastdetect

Change the Boot.ini to become:

Code:
[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT=”Microsoft Windows 2000 Advanced Server”
/fastdetect /PAE

For Bootcfg command, use:

bootcfg /raw “/pae” /A /ID 1

Restart the computer after modification to make the change effective.

Note that even with PAE enabled, there is still memory limit imposed by the operating system itself. The table below list the maximum memory support with PAE enabled for Windows 2000, Windows Server 2003 and Windows XP. Most 32-bit client based Windows operating system, such as Windows XP and Windows Vista (see
way to use large memory of more than 4GB in 32-bit Windows Vista), has OS level limit that restricts the maximum amount of memory able to be used to 4GB.

Operating system : Windows 2000 Advanced Server

Maximum memory support with PAE : 8 GB of physical RAM

Operating system : Windows 2000 Datacenter Server

Maximum memory support with PAE : 32 GB of physical RAM

Operating system : Windows XP (all versions)

Maximum memory support with PAE : 4 GB of physical RAM*

Operating system : Windows Server 2003 (and SP1), Standard Edition

Maximum memory support with PAE : 4 GB of physical RAM*

Operating system : Windows Server 2003, Enterprise Edition

Maximum memory support with PAE : 32 GB of physical RAM

Operating system : Windows Server 2003, Datacenter Edition

Maximum memory support with PAE : 64 GB of physical RAM

Operating system : Windows Server 2003 SP1, Enterprise Edition

Maximum memory support with PAE : 64 GB of physical RAM

Operating system : Windows Server 2003 SP1, Datacenter Edition

Maximum memory support with PAE : 128 GB of physical RAM

Advertisements