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
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

Can I open APN port 2195 on my VPS?

You will get full administrative control of your VPS, therefore you can surely open/close any...

Fix Exim error-exim dead but subsys locked

Problem Statement php mail scripts were not working in Linux VPS. Error Message exim dead but...

How to determine what is using the most disk space on my Linux server?

There are times when you receive following error while accessing the cPanel WebMail or WHM. You...

How to Install Minecraft Game Server in Linux VPS?

This article will assist you to install Minecraft Server in your Linux VPS. Checkout our VPS...

How to Automate Tasks on a Linux VPS Using Cron?

One of our Linux VPS customers faced an issue wherein his Virtual Machine’s system clock was...