Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got Ubuntu 9.04 with 8GB and system monitor reports 2.6GB of Memory + 7.6GB of Swap. What gives?

free -m

jldupont@jldupont-desktop:~$ free -m
             total       used       free     shared    buffers     cached
Mem:          2644       1621       1023          0         29        474
-/+ buffers/cache:       1116       1528 
Swap:         7742          0       7742

swapon -s

jldupont@jldupont-desktop:~$ swapon -s
Filename    			Type		Size	Used	Priority
/dev/sda5                           partition   7928036	0	-1

uname -a

jldupont@jldupont-desktop:~$ uname -a
Linux jldupont-desktop 2.6.28-16-server #55-Ubuntu SMP Tue Oct 20 20:50:00 UTC 2009 i686 GNU/Linux

Dump of my dmesg output is available here.

share|improve this question
    
Can you paste "free -m" output? –  David Pashley Oct 26 '09 at 13:16
    
Oh and "swapon -s" –  David Pashley Oct 26 '09 at 13:16
    
What does CMOS report for your memory? Could be bad RAM, or something wonky in the BIOS. –  Bart Silverstrim Oct 26 '09 at 16:27
    
Glad it looks like you solved the issue. Memory issues can be a real @#% in the @#$ :-) –  Bart Silverstrim Oct 26 '09 at 19:26

3 Answers 3

up vote 1 down vote accepted

That seems odd... What does top or free -m from the command line report. If you are running a 32-bit installation without the PAE (Physical Address Extension) kernel you would only see ~ 3.2 GB of physical memory. If that is the case install:

sudo apt-get install linux-headers-server linux-image-server linux-server

to get the PAE kernel to use the full amount of memory. You won't get more than 4 GB per process, but that probably doesn't matter. Alternatively, you could use the 64-bit version if it is a 64-bit machine.

share|improve this answer
    
ok, i have installed linux-server as directed: I still get 2.6G from top. I am on a 32bit system. What's going on?? –  jldupont Oct 26 '09 at 13:24
    
Did you reboot after installing that? –  Kyle Brandt Oct 26 '09 at 13:27
    
Did you also boot the server kernel? :) –  blank3 Oct 26 '09 at 13:27
    
As blank3 said, make sure you select that kernel in the Gurb boot menu, but I think it should default. Grub will say something like press 'Something' for menu (ESC Maybe?), this will let you select the kernel. With Linux, you generally don't have to reboot after any updates, except the kernel. Sometimes rebooting makes it easier though. It is possible to update the kernel without rebooting, but that is kind of new territory: www.ksplice.com –  Kyle Brandt Oct 26 '09 at 13:32
    
Yes I have selected the -server kernel and still System Monitor reports 2.6G Memory available or more precisely: 1.0GB of 2.6GB used. –  jldupont Oct 26 '09 at 13:36

Check what memory is reported in the CMOS configuration - maybe you have faulty hardware.

Assuming you have a 32-bit CPU, the system monitor should report 4.0 GiB memory. Try removing the excess 4GB. On the other hand, if you have a 64 bit CPU, then install the 64-bit version of Ubuntu.

During installation on a new hard drive the swap partition normally defaults to the same size as the memory, so the 8GB seems normal. Although, in practice, the more memory that there is available the less likely you are to require swap space.

share|improve this answer
    
System Monitory reports 1GB out of 2.6GB total available. –  jldupont Oct 26 '09 at 14:06

running the 32 bit version of Ubuntu? It won't see past 4 gig of memory unless running the 64 bit version.

Running "file /sbin/init" on the terminal should give a hint of what bitness you're running.

share|improve this answer
    
How big is your actual swap partition? Try running gparted and it'll show you your partitions graphically and show you the physical partitions available. After that you can determine what is happening with the swap physical vs. RAM. –  Bart Silverstrim Oct 26 '09 at 12:38
    
sounds like you're getting a combination of physical swap + memory being utilized. –  Bart Silverstrim Oct 26 '09 at 12:38
2  
-1 , 32 bit PAE kernels can see past 4GB. PAE (on most versions of Ubuntu) is supported by default. –  Tim Post Oct 26 '09 at 13:35
    
@tinkertim - afaik it's only enabled on server kernels no desktop editions. –  blank3 Oct 26 '09 at 13:42
    
@tinkertim - I thought it was only on servers by default. Second, he's got 8 gig of RAM, sees 2.6 + 7.6 swap. That comes to 10.2 if I'm doing the math right. Usually you hit a limit in the 4 gig range if it's related to bit-ness. So the first thing I suspect is RAM+Swap+kernel misconfiguration. If someone else has speculation of what to look at first, chime in...still doesn't hurt to check the math of his swap partition + memory to see what he gets. –  Bart Silverstrim Oct 26 '09 at 16:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.