Virtual Machine with CentOS 5 32-Bit OS Does not Address Physical Memory More Than 3 GB

Recently we came across very strange issue wherein Linux virtual machine with Centos 5.X 32 Bit Operating System could not recognize more than 3 GB of RAM. After some research we could find following facts.

By default Centos 5.5 32 bit Operating System comes with Linux 2.4.x Kernel which does support more than 4GB of physical memory. A typical 32 bit Linux kernel uses 1GB of physical memory for it's own use as Kernel Space and rest of physical memory will be used as User Space. Hence, while you are on Centos 5.X 32 Bit Operating System machine without PAE support, user space and kernel space split would be like 3GB/1GB. That means, if you add physical memory more than 3 GB in your machine, your machine would not address it. This issue can be fixed by adding PAE support in Kernel.

What is Physical Address Extension (PAE)?


Physical Address Extension (PAE) also known as Page Address Extension, is a memory management feature for the IE-32 (i386) architecture introduced with Pentium Pro processors. Page Address Extension defines three level page table hierarchy with 64 bits table entries instead of 32. This allows CPUs with PAE to access a physical address space larger than 4 GB. The PAE extension allows a maximum of 64GB of physical memory that the CPU (Not a process) can address. While PAE is not compiled into the kernel the OS can address a maximum of 4GB of RAM. If you are in a similar situation and you wish to get Kernel with PAE support. Run following command from terminal.

yum install kernel-PAE

Once Kernel is installed, edit grub.conf file (usually located at /etc/grub.conf or /boot/grub/grub.conf) with an editor of your choice. Locate the parameter timeout and set it to 10 or more seconds, so you can get more time to select the Kernel from the list. Save grub.conf file and reboot your VPS. 

When your VM comes up after reboot, you will get a list of kernels currently installed in your machine. Select the Kernel you wish to load (Kernel with PAE support). If your VM boots successfully with PAE supported Kernel, set new Kernel to default as follows.

Again edit grub.conf file (it would look like the following), under title parameter you would see list of all installed kernels. Count the position of the Kernel of your choice and set its value in parameter default. Save the grub.conf file and reboot your VM

default=3  // default holds the value of position of Kernel
timeout=10  
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux ES (2.4.21-37.EL) // Kernel in 1st position 
root (hd0,0)
kernel /vmlinuz-2.4.21-37.EL ro root=/dev/hda3
initrd /initrd-2.4.21-37.EL.img
title Red Hat Enterprise Linux ES (2.4.21-32.0.1.EL) // Kernel in 2nd position 
root (hd0,0)
kernel /vmlinuz-2.4.21-32.0.1.EL ro root=/dev/hda3
initrd /initrd-2.4.21-32.0.1.EL.img
title Red Hat Enterprise Linux ES (2.4.21-27.0.4.EL) // Kernel in 3rd position 
root (hd0,0)
kernel /vmlinuz-2.4.21-27.0.4.EL ro root=/dev/hda3
initrd /initrd-2.4.21-27.0.4.EL.img
title Red Hat Enterprise Linux ES (2.4.21-27.0.2.EL) // Kernel in 4th position 
root (hd0,0)
kernel /vmlinuz-2.4.21-27.0.2.EL ro root=/dev/hda3
initrd /initrd-2.4.21-27.0.2.EL.img

Once your VM comes up after reboot fire free -m command to check whether it addresses the physical memory more than 3 GB or not.
  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to Stop and Disable ClamAV Service from CentOS?

We all know that ClamAV scanner is a pretty heavy on CPU-Memory resources, and it should be...

Is it possible to take complete VPS backup in VPS itself?

Please note that, there is no provision to take backup of full VPS image in VPS itself. As an...

How do I connect to Linux VPS through SSH from Linux and Windows OS?

This article will guide you on how to login to Linux VPS through SSH (Secure Shell) from Linux...

How to Upgrade PHP Version in cPanel/WHM Server?

Following article will assist you to upgrade PHP version in cPanel/WHM server. This article is...

How to Install SHOUTCast Radio Server on Linux VPS?

This tutorial will assist you to install SHOUTcast Distributed Network Audio Server (DNAS 2.0) in...