Option # 1: Use 64 bit Ubuntu Linux
64 bit Linux kernel will take care of 4G or more memory. Just grab latest 64 bit version and install it.
Option #2: Install PAE enabled kernel
Open terminal and type the following command if you are using Ubuntu version Ubuntu v9.04 and earlier:
$ sudo apt-get update$ sudo sudo apt-get install linux-headers-server linux-image-server linux-server
If you are using Ubuntu v9.10 (Karmic Koala) and above, enter:
$ sudo apt-get install linux-generic-pae linux-headers-generic-pae
Once kernel images installed, just reboot your workstation, type:
$ sudo reboot
After reboot, login into your system and type the following command to verify memory usage:
$ free -m
Option #3: (10.04)
While installing Ubuntu, sometimes we forget to allocate swap memory. This mistake can degrade the performance of the system. It is advice to allocate swap at the beginning. But its not a major problem since we can allocate swap memory indirectly. SWAP memory should be double of the primary memory. If you have 512MB of RAM then it is wise to allocate 1GB of swap memory.
Here are the steps to increase the swap area in you Linux Machine
1. To create 2GB (2048MB) swap file (1024*2048MB = 2097152 block size)
sudo dd if=/dev/zero of=/swapfile1 bs=1024 count=2097152
2. set up linux swap area
sduo mkswap /swaparea1
3. Activate /swaparea1 swap space immediately
sudo swapon /swaparea1
4. Reebot and open gedit
sudo gedit /etc/fstab
5. Append following line to file
/swaparea1 swap swap defaults 0 0
6. Reboot and to check
sudo free -m