Q. I've total 8 GB RAM installed in my dual boot Ubuntu Linux 8.10 (32 bit) version HP workstation. But free -m command only shows 3291 (3G) memory. How do I use 8GB RAM under Ubuntu Linux?
A. You need to install Physical Address Extension (PAE) aware kernel under 32 bit Ubuntu Linux. It is a feature of x86 and x86-64 processors that allows more than 4 Gigabytes of physical memory to be used in 32-bit systems.
Without PAE kernel, you should see something as follows:
$ free -m
Sample output:
total used free shared buffers cached Mem: 3291 801 2489 0 95 342 -/+ buffers/cache: 363 2927 Swap: 1906 0 1906
You have two options here as follows:
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:
$ sudo apt-get update
$ sudo sudo apt-get install linux-headers-server linux-image-server linux-server
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
Sample output:
total used free shared buffers cached Mem: 8105 1292 6812 0 38 483 -/+ buffers/cache: 770 7334 Swap: 1906 0 1906
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- My 10 UNIX Command Line Mistakes
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
- Email FAQ to a friend
- Download PDF version
- Printable version
- Comment RSS feed
- Last Updated: 12/27/08



{ 64 comments… read them below or add one }
One should mention, that with 64bit Linux your applications will use about 160% of RAM (compared to 32bit). This is because of the different memory addressing. 32bit PAE kernel does not use more RAM. If you do not use special 64bit optimized programs (e.g. some sql apps etc.), 32bit with PAE is the best way to go.
With 8GB of RAM, having slightly different memory mapping isn’t going to really be an issue unless they are using it for hardcore server usage (esp. java servers). Going 64bit is my recommendation, hands down. I’ve notice a lot of performance increases in many of the libraries over 32bit installs. For most of us, it’s just a matter of preference and I really prefer a solid 64bit installation.
Does Option #2 work for desktop version and for linux-rt kernels as well?
Many thanks.
how about restricted drivers? i once tried upgrading it using 32-bit PAE but the result ended the system failed to initialize X windows.
@blink4blog,
You need to first disable restricted driver. Install PAE kernel an d reboot. After reboot, enable restricted driver. This should fix the problem.
@ kakyo,
It should work.
@Xiao Haozi
You are right, you may gain 30-40% performance boost with 64 bit kernel and libs. However, many desktop apps are not ready for 64 bit stuff like multimedia. Anyways, it is matter of choice.
for its not working.. i think the bios is lock the 4GB usage.. that me right..
11: None 00.0: 10102 Main Memory
[Created at memory.61]
Unique ID: rdCR.CxwsZFjVASF
Hardware Class: memory
Model: “Main Memory”
Memory Range: 0×00000000-0xc5d7ffff (rw)
Memory Size: 3 GB
Config Status: cfg=new, avail=yes, need=no, active=unknown
but using the dmideco it show that my motherboard support up to 4g
Handle 0×000B, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 4 GB
Error Information Handle: Not Provided
Number Of Devices: 2
With Option #1, you will max out at about 16 TB of RAM.
I managed to use the server kernel, and successfully using PAE. Unfortunately, my WiFi card doesn’t work (even while being detected in lspci), so I lose my net connection. Any solution for that? My card uses the Atheros driver.
Nevermind, I solved it by enabling the driver (ath5k) manually in /etc/modules.
I have Ubuntu 8.04 – intel Quad with 4GB showing 3.2GB as above. I’m trying to decided to do the PAE or 64Bit. This is a desktop. I think its originally an Ubuntu Server install and then I install ubuntu-desktop.
I have a new Nvidia video card. I don’t know if I should install the new video card, then try to do the upgrade to PAE or do the PAE upgrade, then install the Nvidia card and restricted drivers.
Or just go 64bit install with the nvidia card already plugged in and hope stuff works!
I need to develop Java and Rails apps on this box.
Any thoughts?
@Brian,
Go with 64 bit if you do not plan to use lots of multimedia stuff as most plugins only works with 32 bit system.
You can install Nvidia card, install the PAE kernel, reboot the system. Download driver from offical website and install it or just enable restricted driver.
This didn’t work for me at all:
% uname –r ; free -m | grep -w Mem
2.6.27-11-server
Mem: 3037 715 2322 0 21 296
Bios and dmidecode see the 4gb fine… any tips?
If I convert from desktop to server this way will I loose my GUI? I also run virtualbox so I would prefer NOT to have to any major changes to my system other than upgrade the kernel.
Thanks.
Thanks a bunch! Just got 4Gb ram on my laptop and needed to use more than the 2.9 it was seeing.
I tried option #2, and I still only have 2.9GB, even though I have 4gb installed. Suggestions??
eli,
Assuming you have installed the 32bit modules suggested by Vivek Gite, try to run the following command as root/sudo:
apt-get install linux-restricted-modules-server
I tried , and it works. But the server kernel is bloody slow.Unacceptable.
I do not see any problem. We have several workstations used for engineering and R&D loaded with 8GB RAM or more RAM.
Vivek, have you upgraded to 9.04 yet? Does it come with the PAE enabled kernel?
9.04 server kernel for x86 includes PAE and will recompile nvidia restricted with dkms automatically.
Have installed the 9.04 server kernel and 4GB RAM in my Notebook free -n shows only 3.2 GB
Any suggestions?
dude, just install 64bit ubuntu. keep it simple
It’s not always that simple.
I’ve got 9.04/64bit on my vm server, but I can only see 3.5 of 4G. Dell’s BIOS is ‘doing me the favor’ of chopping out 512M because they never thought I’d put a 64bit OS on my 64bit CPU
If anybody knows how to force ubuntu to ignore ‘reserved’ on bios reported memory zones, I’m all ears.
Worked like a charm in Ubuntu 9.04. Thanks!
Really thank you………I’ve already done the option 2 and now I can see 3,9 Giga available (before 3 Giga).
Great!!!
Hi,
PAE enabled kernel (2.6.28-11 server) works on Ubuntu 9.04, enabling me to see 4GB RAM, but I lose the ability to suspend/hibernate.
Mobile Intel® GM45 Express Chipset
4GB PC2-6400 (2GBx2)
Intel® WiFi Link 5100AGN
Laptop specs:
http://b2b.sony.com/Solutions/product-detail.do?prodId=SEL-M-140144&catId=SEL-yf-dncat-71302
Has anyone got suspend/hibernate to work on the server kernel?
2 Trevor:
To use suspend/hybernate you must have two things:
- hardware support (you have it)
- Enough space in swap partition (for you choise swap space must be equal or greater than your RAM size, eq, no less, than 4GB)
For check, run:
cat /proc/swaps
@Genie: I don’t think suspend has any need of the swap. I experience the same problems as Trevor in my T61 but with the generic kernel suspend works fine even though my swap is only 2GB. what does suspend write to disk?
I confirm that in 9.04 the update suggested for 32-bit desktop version in the blog works perfectly.
Also i have ATI hd3470 and restricted drivers were automatically updated.
Thanks !!
I did all the steps up there with a system that has 12gb of ram installed, but when I execute free -m It only shows up with 3014 total. Whats the next step down the road to more memory?
Also am I going to be able to get it to address all 12 gigs?
Did you rebooted Ubuntu into PAE kernel?
Hi,
Thanks for the response. I have a big enough swap partition at 7GB and the computer will sleep/hibernate in the generic kernel, but it won’t in the server kernel.
-Trevor
FYI : there is one more catch with the Ubuntu server kernel – you can not run VMWare
because of conflicting virtualization technologies. It is a pity Ubuntu does not support
desktop PAE kernel (as many, not to say most other distributions do). Of course there
is always the option of compiling a kernel of your own as described here:
https://help.ubuntu.com/community/Kernel/Compile
but many would feel uncomfortable doing that.
And one remark to the title of the article : unfortunately the limitation for memory is not even
4GB but 3 since 1GB of address space is set aside for purposes other than memory addressing.
i have 512mb ram ddr1, i never new 4gb ram existed, does this mean i can get 4gb and use it on ubuntu and XP
I’m about to get a new laptop and am still undecided as to which way to go – i.e. 64bit or PAE. Probably PAE, as I have a fair amount of multimedia stuff on my present laptop, and I do need to run Sun VirtualBox (unfortunately, there’s still no adequate substitute for Acrobat Pro, CorelDRAW and, to a lesser extent, Photoshop). Will I be able to do that in Ubuntu server? Nikolay mentioned that VMWare won’t run with server kernel, what about Sun VirtualBox? Also all those niceties – Compiz, Cairo-Dock etc – will they be okay on server (might be a silly question, but server doesn’t sound like something designed for that sort of things) – I’ve only been using Linux for a month or so :)
You better go with 32bit oses to load all the stuff. 64bit is more suitable for server usage and not for multimedia or other windows apps.
Thanks, that’s what I suspected…
What about Cairo-Dock, Compiz and Sun VBox? Will they run OK in Jaunty server kernel?
as far as I can understand if you want a faster processing and you can afford buying 64 bit OS(which I guess would be dirt cheap, if you are upgrading from the current 32-bit OS) better go for it. as some one already made it clear that 32-bit machine can’t address beyond ~3.6 gig memory, its better to have 4gig ram along with a 64-bit OS. obviously you will get a better performance and you always have the option of putting 32-bit stuffs on your 64-bit machine(more or less its works fine). 64-bit is the “in” thing, so you should better go for it.
yesterday only i ordered dell studio 15 with 64bit Vista home premium, 4 gigs ram, 320 7200rpm hdd, etc …i’m planning to install ubuntu 64-bit on this, i hope there wont be any problem. lets hope for the best. btw, thanks guys for all your reviews…
#2 just worked out of the package! fine…
The details:
Linux xxx-laptop 2.6.28-14-server #47-Ubuntu SMP Sat Jul 25 01:18:34 UTC 2009 i686 GNU/Linuxtotal used free shared buffers cachedMem: 4021 342 3678 0 4 170
any ideia on how to put intel turbo memory working?
thks
just to add the restricted nvidia drivers updated automatically
It works really fine for me. Thanks!!!
I loaded the server kernel into desktop Ubuntu Hardy. It works fine with Sun VirtualBox and Compiz. Nvidia driver module automatically rebuilt. No apparent slowdowns.
Thanks a lot for the tip! However, after I installed the kernel and rebooted, something really bizarre happened: My machine wouldn’t boot anymore. After the BIOS, it just sits with a blinking cursor. No grub prompt, no nothing. I can get it boot via the Hardy livecd, choosing “boot from the first hard disk”, but reinstalling grub, et. al., seems to have no effect. Does anyone have any idea why my bootloader would be hosed after a simple kernel upgrade?
On the plus side, I can now address all 4 GB of ram in 32-bit Hardy.
How do I get the 64bit kernel without new installation – I this possible and all applications will run (I only have VMware installed)?
Thanks & best regards from Germany
Option #2 work fine with me, many thanks !!!
For those running VMware, or who want to recompile the kernel, I really recommend following this part of the Kernel/Compile page from the Ubuntu kernel team
This is a lot easier than the method shown in first half of this page. I just set HIGHMEM64G and unset HIGHMEM4G in the .config file, then did a ‘make xconfig’ file to check via the config GUI, then recompiled as per this howto.
VMware Server 2.0 is now working nicely with this custom kernel, 2.6.24 based. I didn’t try very hard to get it working with the normal Ubuntu Server kernel, but VMware didn’t work out of the box, hence going for a custom kernel.
I had 4025mb of ram installed, but only saw 3275mb. I have all 4025mb working now.
I copied the ($) the first time in the terminal, duh, don’t do that.
Took my PC about 5 minutes to DL and install. Very slick and easy.
Thanks
Hi,
I have the latest Ubuntu 9.04 Desktop version installed on my T61 Lenovo and everything is working like magic except for the memory ( 2.9Gig available instead of the installed 4Gig). If I use the above method and install the server edition kernel,
1. Is it going to affect anything on my system? Like the suspend/resume/hibernate functions
2. Are there any other side effects? ( WiFi driver problem, display driver problem, sound card driver problem).
3. Also, I have recompiled some of the other software with my own customizations, Will it be affected? ( mplayer with CoreAVC to play HD, XBMC with a little modification)
( I think it should NOT affect any one of these, but wanted to confirm!!)
Thanks
Followed the simple instructions to install the server kernel in Ubuntu 9.04. Nvidia and other kernel modules were automagically installed in the new kernel (very slick!). Compiz still runs smooth and Virtualbox still runs my Win7 instance just fine. No apparent bad side effects.
However ‘free -m’ still reports a total of 3275 bytes of RAM. So, the fix didn’t work for me.
I am definitely using the new kernel, as ‘uname -r’ shows 2.6.28-15-server.
This is running on a Dell D820 laptop. I guess I’ll check the BIOS and see if there are settings there that I need to change.
Don’t forget: if you see less RAM as physically is installed, it could be that your video card is using shared memory (especially in laptops). So go to BIOS and see how much of RAM there is set for video card.
Installed kernel with PAE and enabled memory mapping in BIOS. Now OS sees all 8 GB that I have. No problems with Suspend/Hibernate or anything else, so far. Running Ubuntu 9.04 Desktop with server kernel. Intel Core 2 Duo CPU.
I’m in the same situation as @Garry Cook, but I’m using a Dell Latitude D620. Any suggestions? I really need the full 4GB’s I just installed on this machine.
@TS, it looks like we won’t ever be able to see the full 4GB. From what I’ve read (and I’ve been researching this extensively), this is a hardware limitation of the Intel Mobile 945 chipset. I was hoping there would be a BIOS update available to fix this, but it does not appear to be possible.
Many people continue to say that it is a limitation of a 32 bit OS. While this may be true, an upgrade to a 64 bit OS will not solve the problem for those of us with the Intel Mobile 945 chipset.
@Garry Cook, thanks for your help. That is pretty upsetting. Does the same issue exist for Windows as well? Any idea how I can undo/uninstall everything I just did? For some reason, my VPN is not working properly after I ran “sudo apt-get install linux-headers-server linux-image-server linux-server”. It keeps saying:
Secure VPN Connection terminated locally by the Client
Reason: Failed to establish a VPN connection.
I have verified that this is not a VPN specific issue. I need this to work ASAP so anyone that could help me undo what I just installed I’d be greatly appreciative. I tried a simple sudo apt-get autoremove linux-headers-server linux-image-server linux-server (using ‘autoremove’) but that only removed 3 packages at ~93kb (said it removed the server files, but strangely enough it still exists and runs fine from GRUB). Any help would be appreciated. Thank you.
option 2: works like a charm
works fine for me (toshibe satellite pro P300-274)
suspend/resume is ok
hibernate/resume fails
No message in the log
Any Idea ?
Option 2 : Works fine for me too, Ubuntu 9.10
All restricted drivers are in DKMS, so automatically updated.
Thanks a lot !
Option 2 – Worked for me too.
Ubuntu 9.10 32-bit up to 6GB memory now.
Thanks very much!
thank you cyverciti
Option 2 – Worked for me too.
Ubuntu 9.10 32-bit up to 4GB memory now.
Thanks very much!
after some time i patronized here again via StumbleUpon and found that i were here back then. by the time i am writing now i already on the bandwagon of amd64 9.10 and all drivers work fine with me, at least nVidia graphic driver.
doing PAE does not really solve the entire issue because it creates another issue, i.e. for each process cycle of the CPU instructions set, the PAE get the CPU to do double the work just to achieve 64-bit wonders.
i try to explain using layman term, for more technical explanation, you have to heads off to Wiki.
just my 2 cents
Option 2 – Worked for me too.
Ubuntu 9.10 32-bit up to 4GB memory now.
Thanks very much!
I tried option #2. No dice.
# dmidecode 2.9
SMBIOS 2.4 present.
40 structures occupying 1532 bytes.
Table at 0×000E0000.
Handle 0×0000, DMI type 0, 24 bytes
BIOS Information
Vendor: Apple Inc.
Version: MBP22.88Z.00A5.B07.0708131242
Release Date: 08/13/07
Handle 0×0126, DMI type 19, 15 bytes
Memory Array Mapped Address
Starting Address: 0×00000000000
Ending Address: 0×000FFFFFFFF
Range Size: 4 GB
Physical Array Handle: 0×0121
Partition Width: 0
~$ uname -a
Linux spbdada 2.6.31-18-generic-pae #55-Ubuntu SMP Fri Jan 8 16:13:23 UTC 2010 i686 GNU/Linux
So the PAE kernel is running…
~$ free -m
total used free shared buffers cached
Mem: 3009 2916 92 0 29 384
-/+ buffers/cache: 2503 506
Swap: 0 0 0
But still only seeing 3Gs.. Any ideas?