LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Real Memory Usage (https://www.linuxquestions.org/questions/linux-newbie-8/real-memory-usage-742025/)

prudens 07-22-2009 01:45 PM

Real Memory Usage
 
Hi,

How come my TOP says I have used 3GB of 3.2GB RAM, but my kernel says I only uses 30% = 0.96GB? How do I find out my real memory usage? I know Linux likes to cache some memory...

Code:

top - 13:45:51 up 4 days,  5:34,  1 user,  load average: 1.03, 0.69, 0.41
Tasks:  89 total,  2 running,  87 sleeping,  0 stopped,  0 zombie
Cpu(s): 22.6%us,  1.0%sy,  0.0%ni, 76.4%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  3226300k total,  3099616k used,  126684k free,  187388k buffers
Swap:  7960168k total,        0k used,  7960168k free,  2058128k cached


free
            total      used      free    shared    buffers    cached
Mem:      3226300    3094856    131444          0    187388    2058156
-/+ buffers/cache:    849312    2376988
Swap:      7960168          0    7960168


pljvaldez 07-22-2009 01:47 PM

I use free -lm and look at the "-/+ buffers/cache" line. It will tell you what RAM is available/used by applications.

EDIT: from your "code" post that showed up, it looks like you have something like 850MB used and 2.4 GB free.

johnsfine 07-22-2009 02:03 PM

Side topic: I assume you have 4GB of ram physically plugged into your motherboard. Have you tried to get use of all 4GB?

To use all 4GB, you need:
A motherboard chipset that supports more than 4GB physical address space. Most do, but a few don't.
A BIOS that supports more than 4GB of physical address space. Most do.
The correct BIOS settings, which aren't consistently named from one BIOS to another, that enable memory remapping.
A PAE kernel.

32 bit Windows limits you (by license restriction) to 3.2GB of ram even if you have all of the above details covered. So maybe you expected 32 bit Linux to be no better. But 32 bit Linux can support a full 4GB or even more of physical ram.

If you have a BIOS setting wrong or the wrong kernel for a full 4GB of ram, that is worth correcting. If it is a motherboard hardware restriction it can't be fixed without a new motherboard.

As for memory use (your actual question) see my answer at:
http://www.linuxquestions.org/questi...28#post3616328
That gives just a bit more info than the usual answer such as pljvaldez posted above

prudens 07-22-2009 02:14 PM

The motherboard only supports up to 3.2GB :( I have 4GB installed. It's running Ubuntu Server

prudens 07-22-2009 06:08 PM

Question, how do I see how much RAM is available to mysqld?


All times are GMT -5. The time now is 07:13 AM.